main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
625 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var _curry1 =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./internal/_curry1.js");
|
---|
| 4 |
|
---|
| 5 | var _isNumber =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./internal/_isNumber.js");
|
---|
| 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; |
---|
Note:
See
TracBrowser
for help on using the repository browser.