UNPKG

1-liners

Version:

Useful oneliners and shorthand functions

16 lines (15 loc) 221 B
/** * @module length * * @description * * Returns the length of an array. * * @example * * const length = require('1-liners/length'); * * length([0, 1, 2]); // => 3 * */ export default (arr) => arr.length;