Natural Pacifist Manatees

    string-arrays-equal
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.5 • Public • Published

    string-arrays-equal

    CircleCI npm

    Lightweight, simple test to see if two arrays of strings are equal, ignoring order.

    Usage

    To add to your project, run npm install --save string-arrays-equal.

    var stringArraysEqual = require('string-arrays-equal');
    
    var arrayA = ['a', 'b', 'c', 'd'];
    var arrayB = ['d', 'c', 'b', 'a'];
    var arrayC = ['a', 'b', 'c', 'e'];
    
    console.log('arrayA and arrayB', stringArraysEqual(arrayA, arrayB));
    // arrayA and arrayB, true
    
    console.log('arrayA and arrayC', stringArraysEqual(arrayA, arrayC));
    // arrayA and arrayC, false

    Keywords

    none

    Install

    npm i string-arrays-equal

    DownloadsWeekly Downloads

    79

    Version

    0.2.5

    License

    MIT

    Unpacked Size

    10.3 kB

    Total Files

    19

    Last publish

    Collaborators

    • tdukart