1-liners
Version:
Useful oneliners and shorthand functions
23 lines (20 loc) • 327 B
JavaScript
/**
* @module length
*
* @description
*
* Returns the length of an array.
*
* @example
*
* const length = require('1-liners/length');
*
* length([0, 1, 2]); // => 3
*
*/
;
exports.__esModule = true;
exports["default"] = function (arr) {
return arr.length;
};
module.exports = exports["default"];