Wondering what’s next for npm?Check out our public roadmap! »

    just-insert
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.1 • Public • Published

    just-insert

    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]

    Install

    npm i just-insert

    DownloadsWeekly Downloads

    2

    Version

    2.2.1

    License

    MIT

    Unpacked Size

    3.77 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar