swc/bundler/tests/.cache/deno/f0cf49b6b1c6ffc1b70e866f123da648c406acbc.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

27 lines
642 B
TypeScript

// Loaded from https://deno.land/x/ramda@v0.27.2/source/length.js
import _curry1 from './internal/_curry1.js';
import _isNumber from './internal/_isNumber.js';
/**
* 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 = _curry1(function length(list) {
return list != null && _isNumber(list.length) ? list.length : NaN;
});
export default length;