Inspect JS (original) (raw)
inspect-js
This github and npm organization houses JavaScript projects that help you look at stuff.
Predicates
Functions that ask a question and produce a yes or no answer (`true` or `false`).
- defined -
-
- return the first argument that is
!== undefined
- is-accessor-descriptor -
-
- Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
- is-arguments -
-
- Is this an arguments object? It's a harder question than you think.
- is-array-buffer -
-
- Is this value a JS ArrayBuffer?
- is-arrow-function -
-
- Determine if a function is an ES6 arrow function or not.
- is-async-function -
-
- Determine if a function is a native async function.
- is-bigint -
-
- Is this value an ES BigInt?
- is-boolean-object -
-
- Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-boxed-primitive -
-
- Is this value a boxed primitive? Shim for node's util.isBoxedPrimitive.
- is-callable -
-
- Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
- is-core-module -
-
- Is this specifier a node.js core module?
- is-data-descriptor -
-
- Returns true if a value has the characteristics of a valid JavaScript data descriptor.
- is-data-view -
-
- 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. - is-date-object -
-
- Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-descriptor -
-
- Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
- is-finalizationregistry -
-
- Is this value a JS FinalizationRegistry? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-generator-function -
-
- Determine if a function is a native generator function.
- is-map -
-
- Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-negative-zero -
-
- Is this value negative zero? === will lie to you
- is-number-object -
-
- Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-object -
-
- Checks whether a value is an object
- is-package-root -
-
- Is this directory path the root of a package?
- is-regex -
-
- Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag
- is-registered-symbol -
-
- Is this value a Symbol stored in the global cross-realm Symbol registry?
- is-set -
-
- Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-shared-array-buffer -
-
- Is this value a JS SharedArrayBuffer?
- is-string -
-
- Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-symbol -
-
- Determine if a value is an ES6 Symbol or not.
- is-typed-array -
-
- 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. - is-weakmap -
-
- Is this value a JS WeakMap? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-weakref -
-
- Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-weakset -
-
- Is this value a JS WeakSet? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
- is-well-known-symbol -
-
- Is this value a well-known Symbol?
Comparisons
Packages that compare two things.
Environment
Packages that tell you about the JS env.
Describe
Packages that tell you about a specific JS value.
- array-buffer-byte-length -
-
- Get the byte length of an ArrayBuffer, even in engines without a
.byteLength
method. - data-view-buffer -
-
- Get the ArrayBuffer out of a DataView, robustly.
- data-view-byte-length -
-
- Get the byteLength out of a DataView, robustly.
- data-view-byte-offset -
-
- Get the byteOffset out of a DataView, robustly.
- get-symbol-description -
-
- Gets the description of a Symbol. Handles
Symbol()
vsSymbol('')
properly when possible. - object-inspect -
-
- string representations of objects in node and the browser
- typed-array-buffer -
-
- Get the ArrayBuffer out of a TypedArray, robustly.
- typed-array-byte-length -
-
- Robustly get the byte length of a Typed Array
- typed-array-byte-offset -
-
- Robustly get the byte offset of a Typed Array
- typed-array-length -
-
- Robustly get the length of a Typed Array
- which-boxed-primitive -
-
- Which kind of boxed JS primitive is this?
- which-builtin-type -
-
- What is the type of this builtin JS value?
- which-collection -
-
- Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without
instanceof
, and despite Symbol.toStringTag. - which-typed-array -
-
- Which kind of Typed Array is this JavaScript value? Works cross-realm, without
instanceof
, and despite Symbol.toStringTag.
Pinned Loading
- node's assert.deepEqual algorithm
JavaScript 791 108 - string representations of objects in node and the browser
JavaScript 148 38 - Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
JavaScript 41 9 - Are these two values conceptually equal?
JavaScript 60 7 - Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
JavaScript 11 4 - Which kind of boxed JS primitive is this?
JavaScript 7 2
Repositories
Showing 10 of 78 repositories
- node-exports-info Public
Info about node `exports` field support: version ranges, categories, etc.
inspect-js/node-exports-info’s past year of commit activity
JavaScript
1
MIT
1 1 0
Updated Mar 26, 2025 - which-typed-array Public
Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
inspect-js/which-typed-array’s past year of commit activity
JavaScript
11
MIT
4 1 0
Updated Mar 9, 2025 - has-strict-mode Public
Does the current JS environment have strict mode? ES5+ should; but let's not assume.
inspect-js/has-strict-mode’s past year of commit activity
JavaScript
5
MIT
1 1 0
Updated Feb 12, 2025 - available-typed-arrays Public
Returns an array of Typed Array names that are available in the current environment.
inspect-js/available-typed-arrays’s past year of commit activity
JavaScript
3
MIT
3 1 0
Updated Feb 7, 2025 - is-boolean-object Public
Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
inspect-js/is-boolean-object’s past year of commit activity
JavaScript
7
MIT
2 1 0
Updated Feb 5, 2025 - object-inspect Public
string representations of objects in node and the browser
inspect-js/object-inspect’s past year of commit activity - is-weakref Public
Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
inspect-js/is-weakref’s past year of commit activity
JavaScript
3
MIT
2 1 0
Updated Feb 3, 2025 - hastypes Public
Does the given package have TypeScript types?
inspect-js/hastypes’s past year of commit activity
JavaScript
8
MIT 0
0 0
Updated Feb 3, 2025 - inspect-js/is-async-function’s past year of commit activity
JavaScript
18
MIT
2 1 0
Updated Jan 23, 2025 - inspect-js/is-well-known-symbol’s past year of commit activity
JavaScript
2
MIT
1 1 0
Updated Jan 7, 2025