mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
21 lines
554 B
TypeScript
21 lines
554 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_isArray.js
|
|
|
|
|
|
/**
|
|
* Tests whether or not an object is an array.
|
|
*
|
|
* @private
|
|
* @param {*} val The object to test.
|
|
* @return {Boolean} `true` if `val` is an array, `false` otherwise.
|
|
* @example
|
|
*
|
|
* _isArray([]); //=> true
|
|
* _isArray(null); //=> false
|
|
* _isArray({}); //=> false
|
|
*/
|
|
export default Array.isArray || function _isArray(val) {
|
|
return (val != null &&
|
|
val.length >= 0 &&
|
|
Object.prototype.toString.call(val) === '[object Array]');
|
|
};
|