UNPKG

js-partial-is-array

Version:

A partial to check whether an object is an array.

2 lines 732 B
/*! js-partial-is-array v0.0.2 | MIT License | (c) Richard King - richrdkng@gmail.com */ !function(n,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():n.js_partial_isArray=t()}(this,function(){"use strict";return function(n,t,r){var e=t===!0,i=r===!0;if(null!==n&&"object"==typeof n){if("[object Array]"===Object.prototype.toString.call(n))return!0;if(e&&(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array))return!0;if(i&&"length"in n&&"number"==typeof n.length)return!0}return!1}});