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

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

    3.1.0 • Public • Published

    just-shuffle

    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 shuffle from 'just-shuffle';
    
    shuffle([1, 2, 3]); 
    // array with original elements randomly sorted
    shuffle([1, 2, 3], {shuffleAll: true}); 
    // array with original elements randomly sorted and all in new postions
    shuffle([]); // []
    shuffle([1]); // [1]
    shuffle(); // throws
    shuffle(undefined); // throws
    shuffle(null); // throws
    shuffle({}); // throws

    Install

    npm i just-shuffle

    DownloadsWeekly Downloads

    333

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    3.77 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar