Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules1/regl/lib/util/is-ndarray.js
T
2026-09-10 15:40:10 +08:00

14 lines
365 B
JavaScript

var isTypedArray = require('./is-typed-array')
module.exports = function isNDArrayLike (obj) {
return (
!!obj &&
typeof obj === 'object' &&
Array.isArray(obj.shape) &&
Array.isArray(obj.stride) &&
typeof obj.offset === 'number' &&
obj.shape.length === obj.stride.length &&
(Array.isArray(obj.data) ||
isTypedArray(obj.data)))
}