any-length

1.0.0 • Public • Published

Any Length

This module returns length of any type.

Install

Install with npm:

$ npm install --save any-length
 
const anyLength = require('any-length');
 
console.log( anyLength(123), 3 ); // return 3
 
console.log( anyLength("foo"), 3 ); // return 3
 
console.log( anyLength([ 1, 2, 3, 4, 5 ]), 5 ); // return 5
 
console.log( anyLength({ a: "b", c: "d" } ), 2 ); // return 2
 

Running tests

$ node test.js

License

Released under the MIT License.

Package Sidebar

Install

npm i any-length

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

45.6 kB

Total Files

11

Last publish

Collaborators

  • faramj