Nurturing Palpable Magnificence

    array-duplicated

    2.0.0 • Public • Published

    array-duplicated

    npm version Build Status Coverage Status

    Return duplicated values in a given Array

    arrayDuplicated(['a', 2, 'b', true, 'b', 12, 'b', true, ['a']]) //=> ['b', true];

    Installation

    Use npm.

    npm install array-duplicated
    

    API

    import arrayDuplicated from 'array-duplicated';

    arrayDuplicated(array)

    array: Array<any>
    Return: Array

    It finds duplicated values in the Array and returns an Array of them.

    arrayDuplicated([0, 1, 1, 1, 1, 1, 1, 1, 1, 1]); //=> [1]

    "Duplicated" means a value is identical to another value in the ECMAScript same-value equality level.

    arrayDuplicated([-1, 1]); //=> []

    License

    ISC License © 2017 - 2018 Shinnosuke Watanabe

    Install

    npm i array-duplicated

    DownloadsWeekly Downloads

    24

    Version

    2.0.0

    License

    ISC

    Unpacked Size

    4.79 kB

    Total Files

    5

    Last publish

    Collaborators

    • shinnn