compared

0.1.1 • Public • Published

compared

Compare Array item length

Install

Install with npm:

$ npm install --save compared

Usage

var compared = require('compared')
compared([])
//=> undefined
 
compared(['1', 12, 123, 1234])
//=> '1234'
 
compared(['aaaaa', 'bbbb', 'ccc'])
//=> 'aaaaa'
 
compared(['aaaaa', 'bbbb', 'ccc']).length
//=> 5
 
compared([null, undefined, (function (a) { }), NaN, '123'])
// => '123'

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm i && npm test

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i compared

    Weekly Downloads

    2

    Version

    0.1.1

    License

    ISC

    Last publish

    Collaborators

    • crazyfake