inspect-js
JavaScript value inspection tools.
Built from inspect-js's public GitHub profile. Not on Take My Repo yet, so there are no posts or updates here.
Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Returns true if a value has the characteristics of a valid JavaScript data descriptor.
Determine if the JS environment has Symbol support. Supports spec, or shams.
Is this an arguments object? It's a harder question than you think.
Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.
Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.
Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
Does this JS environment support the `name` property on functions?