Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 517 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 517 Bytes

just-union

Part of a library of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

Try it now

import insert from 'just-insert';

insert([1, 2, 5, 6], ['a', 'c', 'e'], 2); // [1, 2, 'a', 'c', 'e', 5, 6]
insert([1, 2, 5, 6], 'a', 2); // [1, 2, 'a', 5, 6]
insert([1, 2, 5, 6], ['a', 'c', 'e'], 0); // ['a', 'c', 'e', 1, 2, 5, 6]
insert([1, 2, 5, 6], ['a', 'c', 'e']); // ['a', 'c', 'e', 1, 2, 5, 6]