Inspect JS
Organization@inspect-js
JavaScript value inspection tools.
58
Published Tools
0
Total Stars
92,808,528
Weekly Downloads
52
GitHub Followers
78
Public Repos
Published Tools
58 Skillsacross 1 categoryarray-buffer-byte-length
ljharb
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
available-regexp-flags
ljharb
Which regular expression flags does the current environment support?
available-typed-arrays
ljharb
Returns an array of Typed Array names that are available in the current environment
data-view-buffer
ljharb
Get the ArrayBuffer out of a DataView, robustly.
data-view-byte-length
ljharb
Get the byteLength out of a DataView, robustly.
data-view-byte-offset
ljharb
Get the byteOffset out of a DataView, robustly.
deep-equal-json
ljharb
`deep-equal`, but only for JSON-supported values.
functions-have-names
ljharb
Does this JS environment support the `name` property on functions?
get-symbol-description
ljharb
Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.
has-dynamic-import
ljharb
Does the current environment have `import()` support?
has-package-exports
ljharb
Does the current node version have support for the "exports" field in package.json?
has-property-descriptors
ljharb
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
has-proto
ljharb
Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?
has-tostringtag
ljharb
Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.
hasown
ljharb
A robust, ES3 compatible, "has own property" predicate.
is-accessor-descriptor
ljharb
Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
is-array-buffer
ljharb
Is this value a JS ArrayBuffer?
is-bigint
ljharb
Is this value an ES BigInt?
is-core-module
ljharb
Is this specifier a node.js core module?
is-data-descriptor
ljharb
Returns true if a value has the characteristics of a valid JavaScript data descriptor.
is-data-view
ljharb
Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.
...moreis-descriptor
ljharb
Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
...moreis-finalizationregistry
ljharb
Is this value a JS FinalizationRegistry? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-map
ljharb
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-set
ljharb
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-shared-array-buffer
ljharb
Is this value a JS SharedArrayBuffer?
is-weakmap
ljharb
Is this value a JS WeakMap? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-weakref
ljharb
Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-weakset
ljharb
Is this value a JS WeakSet? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
node-exports-info
ljharb
Info about node `exports` field support: version ranges, categories, etc.
supports-preserve-symlinks-flag
ljharb
Determine if the current node version supports the `--preserve-symlinks` flag.
typed-array-buffer
ljharb
Get the ArrayBuffer out of a TypedArray, robustly.
typed-array-byte-length
ljharb
Robustly get the byte length of a Typed Array
typed-array-byte-offset
ljharb
Robustly get the byte offset of a Typed Array
typed-array-length
ljharb
Robustly get the length of a Typed Array
which-boxed-primitive
ljharb
Which kind of boxed JS primitive is this?
which-builtin-type
ljharb
What is the type of this builtin JS value?
which-collection
ljharb
Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
...moredeep-equal
ljharb
node's assert.deepEqual algorithm
buffer-equal
ljharb
return whether two buffers are equal
defined
ljharb
return the first argument that is `!== undefined`
has-symbols
ljharb
Determine if the JS environment has Symbol support. Supports spec, or shams.
has-template-literals
ljharb
Determine if the JS environment has template literal support.
is-arguments
ljharb
Is this an arguments object? It's a harder question than you think.
is-async-function
ljharb
Determine if a function is a native async function.
is-boolean-object
ljharb
Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-callable
ljharb
Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
is-date-object
ljharb
Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-generator-function
ljharb
Determine if a function is a native generator function.
is-negative-zero
ljharb
Is this value negative zero? === will lie to you
is-number-object
ljharb
Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-object
ljharb
Checks whether a value is an object
is-regex
ljharb
Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag
is-string
ljharb
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
is-symbol
ljharb
Determine if a value is an ES6 Symbol or not.
is-typed-array
ljharb
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.
...moreobject-inspect
ljharb
string representations of objects in node and the browser
which-typed-array
ljharb
Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
...more