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

    unordered-array-match

    1.2.1 • Public • Published

    unordered-array-match

    npm XO code style Build Status codecov

    Shallow check two arrays contain the same items in any order

    Installation

    npm install --save unordered-array-match
    

    Usage

    const unorderedArrayMatch = require('unordered-array-match');
     
    unorderedArrayMatch(['a', 23, 'pineapple'], ['pineapple', 'a', 23]);  // true
    unorderedArrayMatch(['a', 'b', 'c', 1, 2, 3], [3, 'c', 2, 'b', 1, 'a']);  // true
    unorderedArrayMatch(['a', 23], [23, 'a', 'coconut']);  // false
    unorderedArrayMatch(['a', 23], [42]); // false

    Install

    npm i unordered-array-match

    DownloadsWeekly Downloads

    5

    Version

    1.2.1

    License

    MIT

    Last publish

    Collaborators

    • avatar