any-length
v1.0.0
Published
This module returns length of any type.
Downloads
11
Maintainers
Readme
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.