1 | var _curry1 =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_curry1");
|
4 |
|
5 | var _isNumber =
|
6 | /*#__PURE__*/
|
7 | require("./internal/_isNumber");
|
8 | /**
|
9 | * Returns the number of elements in the array by returning `list.length`.
|
10 | *
|
11 | * @func
|
12 | * @memberOf R
|
13 | * @since v0.3.0
|
14 | * @category List
|
15 | * @sig [a] -> Number
|
16 | * @param {Array} list The array to inspect.
|
17 | * @return {Number} The length of the array.
|
18 | * @example
|
19 | *
|
20 | * R.length([]); //=> 0
|
21 | * R.length([1, 2, 3]); //=> 3
|
22 | */
|
23 |
|
24 |
|
25 | var length =
|
26 | /*#__PURE__*/
|
27 | _curry1(function length(list) {
|
28 | return list != null && _isNumber(list.length) ? list.length : NaN;
|
29 | });
|
30 |
|
31 | module.exports = length; |
\ | No newline at end of file |