GitHub / inspect-js 76 Repositories
JavaScript value inspection tools.
Donate: https://github.com/sponsors/ljharb, https://tidelift.com/funding/github/npm/deep-equal
inspect-js/object-inspect
string representations of objects in node and the browser
Language: JavaScript - Size: 318 KB - Last synced at: 6 days ago - Pushed at: 3 months ago - Stars: 148 - Forks: 38

inspect-js/is-core-module
Is this specifier a node.js core module?
Language: JavaScript - Size: 133 KB - Last synced at: 9 days ago - Pushed at: 5 months ago - Stars: 25 - Forks: 9

inspect-js/node-deep-equal
node's assert.deepEqual algorithm
Language: JavaScript - Size: 321 KB - Last synced at: 8 days ago - Pushed at: over 1 year ago - Stars: 791 - Forks: 108

inspect-js/is-date-object
Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 130 KB - Last synced at: 9 days ago - Pushed at: 5 months ago - Stars: 16 - Forks: 5

inspect-js/is-arguments
Is this an arguments object? It's a harder question than you think.
Language: JavaScript - Size: 152 KB - Last synced at: 15 days ago - Pushed at: 5 months ago - Stars: 16 - Forks: 7

inspect-js/node-exports-info
Info about node `exports` field support: version ranges, categories, etc.
Language: JavaScript - Size: 113 KB - Last synced at: 4 days ago - Pushed at: about 2 months ago - Stars: 1 - Forks: 1

inspect-js/which-typed-array
Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
Language: JavaScript - Size: 313 KB - Last synced at: 8 days ago - Pushed at: 2 months ago - Stars: 11 - Forks: 4

inspect-js/has-strict-mode
Does the current JS environment have strict mode? ES5+ should; but let's not assume.
Language: JavaScript - Size: 62.5 KB - Last synced at: 20 days ago - Pushed at: 3 months ago - Stars: 5 - Forks: 1

inspect-js/has-symbols
Determine if the JS environment has Symbol support. Supports spec, or shams.
Language: JavaScript - Size: 105 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 16 - Forks: 4

inspect-js/is-symbol
Is this an ES6 Symbol value?
Language: JavaScript - Size: 128 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 19 - Forks: 5

inspect-js/is-data-descriptor
Returns true if a value has the characteristics of a valid JavaScript data descriptor.
Language: JavaScript - Size: 117 KB - Last synced at: 8 days ago - Pushed at: 9 months ago - Stars: 21 - Forks: 6

inspect-js/available-typed-arrays
Returns an array of Typed Array names that are available in the current environment.
Language: JavaScript - Size: 86.9 KB - Last synced at: 8 days ago - Pushed at: 3 months ago - Stars: 3 - Forks: 3

inspect-js/is-boolean-object
Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 128 KB - Last synced at: 8 days ago - Pushed at: 3 months ago - Stars: 7 - Forks: 2

inspect-js/is-weakref
Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 88.9 KB - Last synced at: 9 days ago - Pushed at: 3 months ago - Stars: 3 - Forks: 2

inspect-js/hastypes
Does the given package have TypeScript types?
Language: JavaScript - Size: 26.4 KB - Last synced at: 6 days ago - Pushed at: 3 months ago - Stars: 8 - Forks: 0

inspect-js/is-string
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 104 KB - Last synced at: 7 days ago - Pushed at: 5 months ago - Stars: 21 - Forks: 3

inspect-js/typed-array-length
Robustly get the length of a Typed Array.
Language: JavaScript - Size: 101 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 8 - Forks: 2

inspect-js/is-async-function
Is this a native `async function`?
Language: JavaScript - Size: 246 KB - Last synced at: 4 days ago - Pushed at: 4 months ago - Stars: 18 - Forks: 2

inspect-js/is-equal
Are these two values conceptually equal?
Language: JavaScript - Size: 340 KB - Last synced at: 5 days ago - Pushed at: over 1 year ago - Stars: 60 - Forks: 7

inspect-js/is-well-known-symbol
Is this value a well-known Symbol?
Language: JavaScript - Size: 56.6 KB - Last synced at: 6 days ago - Pushed at: 4 months ago - Stars: 2 - Forks: 1

inspect-js/is-set
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 93.8 KB - Last synced at: 8 days ago - Pushed at: 4 months ago - Stars: 3 - Forks: 3

inspect-js/is-generator-function
Is this an ES6 generator function?
Language: JavaScript - Size: 161 KB - Last synced at: 9 days ago - Pushed at: 4 months ago - Stars: 49 - Forks: 11

inspect-js/is-negative-zero
Is this value negative zero? === will lie to you.
Language: JavaScript - Size: 98.6 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 18 - Forks: 6

inspect-js/available-regexp-flags
Which regular expression flags does the current environment support?
Language: JavaScript - Size: 66.4 KB - Last synced at: about 1 month ago - Pushed at: 5 months ago - Stars: 6 - Forks: 1

inspect-js/data-view-byte-length
Get the byteLength out of a DataView, robustly.
Language: JavaScript - Size: 33.2 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 0

inspect-js/data-view-buffer
Get the ArrayBuffer out of a DataView, robustly.
Language: JavaScript - Size: 38.1 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 0

inspect-js/array-buffer-byte-length
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
Language: JavaScript - Size: 40 KB - Last synced at: 9 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 0

inspect-js/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.
Language: JavaScript - Size: 36.1 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 0

inspect-js/data-view-byte-offset
Get the byteOffset out of a DataView, robustly.
Language: JavaScript - Size: 31.3 KB - Last synced at: 9 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 0

inspect-js/is-array-buffer
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.
Language: JavaScript - Size: 385 KB - Last synced at: 9 days ago - Pushed at: 5 months ago - Stars: 13 - Forks: 5

inspect-js/typed-array-byte-offset
Robustly get the byte offset of a Typed Array.
Language: JavaScript - Size: 66.4 KB - Last synced at: 9 days ago - Pushed at: 5 months ago - Stars: 5 - Forks: 0

inspect-js/has-bigints
Determine if the JS environment has BigInt support.
Language: JavaScript - Size: 71.3 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 8 - Forks: 5

inspect-js/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.
Language: JavaScript - Size: 189 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 12 - Forks: 7

inspect-js/is-shared-array-buffer
Is this value a JS SharedArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.
Language: JavaScript - Size: 82 KB - Last synced at: 12 days ago - Pushed at: 5 months ago - Stars: 3 - Forks: 2

inspect-js/typed-array-buffer
Get the ArrayBuffer out of a TypedArray, robustly.
Language: JavaScript - Size: 46.9 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 4 - Forks: 0

inspect-js/typed-array-byte-length
Get the byte length of a Typed Array, even in engines without a `.byteLength` method.
Language: JavaScript - Size: 40 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 0 - Forks: 0

inspect-js/has-typed-arrays
Determine if the JS environment has Typed Arrays.
Language: JavaScript - Size: 64.5 KB - Last synced at: 10 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 1

inspect-js/get-symbol-description
Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.
Language: JavaScript - Size: 67.4 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 3 - Forks: 2

inspect-js/is-weakset
Is this value a JS WeakSet? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 101 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 3 - Forks: 1

inspect-js/is-finalizationregistry
Is this value a JS FinalizationRegistry? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 85 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 2 - Forks: 1

inspect-js/is-registered-symbol
Is this value a Symbol stored in the global cross-realm Symbol registry?
Language: JavaScript - Size: 39.1 KB - Last synced at: about 1 month ago - Pushed at: 5 months ago - Stars: 4 - Forks: 1

inspect-js/has-dynamic-import
Does the current environment have `import()` support?
Language: JavaScript - Size: 85.9 KB - Last synced at: 20 days ago - Pushed at: 5 months ago - Stars: 3 - Forks: 1

inspect-js/which-boxed-primitive
Which kind of boxed JS primitive is this?
Language: JavaScript - Size: 77.1 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 7 - Forks: 2

inspect-js/is-number-object
Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 110 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 8 - Forks: 3

inspect-js/which-builtin-type
What is the type of this builtin JS value?
Language: JavaScript - Size: 129 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 3 - Forks: 1

inspect-js/deep-equal-json
`deep-equal`, but only for JSON-supported values.
Language: JavaScript - Size: 24.4 KB - Last synced at: 19 days ago - Pushed at: 5 months ago - Stars: 9 - Forks: 0

inspect-js/is-regex
Is this value a JS regex?
Language: JavaScript - Size: 202 KB - Last synced at: 4 days ago - Pushed at: 5 months ago - Stars: 24 - Forks: 11

inspect-js/has-proto
Does this environment have the ability to set the [[Prototype]] of an object on creation with `__proto__`?
Language: JavaScript - Size: 56.6 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 6 - Forks: 3

inspect-js/is-bigint
Is this an ES BigInt value?
Language: JavaScript - Size: 75.2 KB - Last synced at: 8 days ago - Pushed at: 5 months ago - Stars: 7 - Forks: 2

inspect-js/defined
Language: JavaScript - Size: 29.3 KB - Last synced at: 6 days ago - Pushed at: over 2 years ago - Stars: 5 - Forks: 1

inspect-js/has-tostringtag
Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.
Language: JavaScript - Size: 55.7 KB - Last synced at: 3 days ago - Pushed at: 5 months ago - Stars: 5 - Forks: 2

inspect-js/is-weakmap
Is this value a JS WeakMap? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Language: JavaScript - Size: 75.2 KB - Last synced at: 8 days ago - Pushed at: 6 months ago - Stars: 3 - Forks: 1

inspect-js/functions-have-names
Does this JS environment support the `name` property on functions?
Language: JavaScript - Size: 76.2 KB - Last synced at: about 3 hours ago - Pushed at: over 2 years ago - Stars: 9 - Forks: 1

inspect-js/buffer-equal
Language: JavaScript - Size: 29.3 KB - Last synced at: 20 days ago - Pushed at: over 2 years ago - Stars: 3 - Forks: 1

inspect-js/is-object
Checks whether a value is an object, because typeof is a troll
Language: JavaScript - Size: 82 KB - Last synced at: 3 days ago - Pushed at: over 2 years ago - Stars: 21 - Forks: 7

inspect-js/is-map
Is this value a JS Map? This module works cross-realm/iframe, and despite %Symbol.toStringTag%.
Language: JavaScript - Size: 85 KB - Last synced at: 8 days ago - Pushed at: about 1 year ago - Stars: 8 - Forks: 5

inspect-js/.github
.github repo for inspect-js org
Language: JavaScript - Size: 74.2 KB - Last synced at: about 1 month ago - Pushed at: 11 months ago - Stars: 1 - Forks: 2

inspect-js/is-whatwg-url
Is this value a WHATWG-standard URL object?
Language: JavaScript - Size: 10.7 KB - Last synced at: about 1 month ago - Pushed at: 11 months ago - Stars: 2 - Forks: 0

inspect-js/is-callable
Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
Language: JavaScript - Size: 325 KB - Last synced at: 8 days ago - Pushed at: over 2 years ago - Stars: 41 - Forks: 9

inspect-js/object-is Fork of es-shims/object-is
ES6-compliant shim for Object.is - differentiates between -0 and +0, and can compare to NaN.
Language: JavaScript - Size: 118 KB - Last synced at: about 1 year ago - Pushed at: over 3 years ago - Stars: 0 - Forks: 0

inspect-js/is-nan Fork of es-shims/is-nan
ES6-compliant shim for Number.isNaN - the global isNaN returns false positives.
Language: JavaScript - Size: 73.2 KB - Last synced at: about 1 year ago - Pushed at: over 4 years ago - Stars: 0 - Forks: 0

inspect-js/which-collection
Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.
Language: JavaScript - Size: 64.5 KB - Last synced at: 8 days ago - Pushed at: about 1 year ago - Stars: 10 - Forks: 2

inspect-js/hasOwn
A robust, ES3 compatible, "has own property" predicate.
Language: JavaScript - Size: 38.1 KB - Last synced at: 8 days ago - Pushed at: about 1 year ago - Stars: 1 - Forks: 0

inspect-js/has-named-captures
Does the JS environment support named capture groups in regexes?
Language: JavaScript - Size: 17.6 KB - Last synced at: 27 days ago - Pushed at: about 1 year ago - Stars: 2 - Forks: 0

inspect-js/has-package-exports
Does the current node version have support for the "exports" field in package.json?
Language: JavaScript - Size: 111 KB - Last synced at: 17 days ago - Pushed at: almost 2 years ago - Stars: 8 - Forks: 1

inspect-js/has-object-spread
check if the environment supports { ...a } spread syntax
Language: JavaScript - Size: 29.3 KB - Last synced at: 16 days ago - Pushed at: over 2 years ago - Stars: 4 - Forks: 1

inspect-js/has-optional-chaining
Determine if the JS environment has optional chaining support
Language: JavaScript - Size: 19.5 KB - Last synced at: 16 days ago - Pushed at: over 2 years ago - Stars: 5 - Forks: 1

inspect-js/has-package-imports
Does the current node version have support for the "imports" field in package.json?
Language: JavaScript - Size: 41 KB - Last synced at: about 1 month ago - Pushed at: over 2 years ago - Stars: 3 - Forks: 1

inspect-js/has-package-self-reference
Does the current node version have support for requiring/importing its own name?
Language: JavaScript - Size: 57.6 KB - Last synced at: 1 day ago - Pushed at: over 2 years ago - Stars: 2 - Forks: 1

inspect-js/has-private-fields
Determine if the JS environment has private fields (`class { #x; }`) support.
Language: JavaScript - Size: 47.9 KB - Last synced at: about 1 month ago - Pushed at: over 2 years ago - Stars: 5 - Forks: 1

inspect-js/has-template-literals
Determine if the JS environment has template literal support
Language: JavaScript - Size: 63.5 KB - Last synced at: 18 days ago - Pushed at: over 2 years ago - Stars: 7 - Forks: 1

inspect-js/is-arrow-function
Determine if a function is an ES6 arrow function or not.
Language: JavaScript - Size: 101 KB - Last synced at: 28 days ago - Pushed at: about 1 year ago - Stars: 22 - Forks: 3

inspect-js/is-boxed-primitive
Polyfill/shim for node's `util.types.isBoxedPrimitive()`
Language: JavaScript - Size: 58.6 KB - Last synced at: 22 days ago - Pushed at: over 2 years ago - Stars: 7 - Forks: 1

inspect-js/has-property-descriptors
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
Language: JavaScript - Size: 30.3 KB - Last synced at: 8 days ago - Pushed at: about 1 year ago - Stars: 3 - Forks: 1

inspect-js/node-supports-preserve-symlinks-flag
Determine if the current node version supports the `--preserve-symlinks` flag.
Language: JavaScript - Size: 23.4 KB - Last synced at: 8 days ago - Pushed at: over 2 years ago - Stars: 1 - Forks: 3

inspect-js/has-override-mistake
Determine whether the environment has the so-called "override mistake" - [[Set]]ing a property whose ancestor is nonwritable throws.
Language: JavaScript - Size: 23.4 KB - Last synced at: about 1 month ago - Pushed at: about 1 year ago - Stars: 2 - Forks: 0

inspect-js/is-accessor-descriptor
Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
Language: JavaScript - Size: 124 KB - Last synced at: 8 days ago - Pushed at: over 1 year ago - Stars: 15 - Forks: 4

inspect-js/is-descriptor
Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
Language: JavaScript - Size: 97.7 KB - Last synced at: 8 days ago - Pushed at: over 1 year ago - Stars: 12 - Forks: 4
