test-action-debian-package/node_modules/ramda/src/length.js
Dawid Dziurla 9308795b8b
update
2020-03-26 15:37:35 +01:00

31 lines
619 B
JavaScript

var _curry1 =
/*#__PURE__*/
require("./internal/_curry1");
var _isNumber =
/*#__PURE__*/
require("./internal/_isNumber");
/**
* Returns the number of elements in the array by returning `list.length`.
*
* @func
* @memberOf R
* @since v0.3.0
* @category List
* @sig [a] -> Number
* @param {Array} list The array to inspect.
* @return {Number} The length of the array.
* @example
*
* R.length([]); //=> 0
* R.length([1, 2, 3]); //=> 3
*/
var length =
/*#__PURE__*/
_curry1(function length(list) {
return list != null && _isNumber(list.length) ? list.length : NaN;
});
module.exports = length;