UNPKG

@stdlib/assert-is-typed-array-like

Version:

Test if a value is typed-array-like.

6 lines (5 loc) 543 B
"use strict";var n=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var i=n(function(b,t){ var s=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,o=require('@stdlib/constants-array-max-typed-array-length/dist');function y(e){return e!==null&&typeof e=="object"&&s(e.length)&&e.length<=o&&typeof e.BYTES_PER_ELEMENT=="number"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number"}t.exports=y });var f=i();module.exports=f; /** @license Apache-2.0 */ //# sourceMappingURL=index.js.map