object-inspect
npmv1.13.4string representations of objects in node and the browser
Adopt with care
object-inspect is usable, with caveats. Last published 582 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 582 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 101 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding object-inspect to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >= 0.4
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the object-inspect README.
var inspect = require('object-inspect');
var obj = { a: 1, b: [3,4] };
obj.c = obj;
console.log(inspect(obj));object-inspect vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| object-inspectthis page | 0 | 24 | MIT | 1 year ago |
| serialize-error | 0 | 2 | MIT | 1 day ago |
| fast-json-stable-stringify | 137.5M | 2 | MIT | 1 day ago |
| es-define-property | 131.3M | 4 | MIT | 1 day ago |
| merge-descriptors | 113M | 1 | MIT | 1 day ago |
| is-plain-obj | 112.9M | 1 | MIT | 1 day ago |
Dependencies
Declared by object-inspect v1.13.4. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (24)
Used by
Popular packages that depend on object-inspect.
ES Math-related intrinsics and helpers, robustly cached.
Robustly `.call.bind()` a function
ES spec-like internal slots
Store information about any JS value in a side channel. Uses WeakMap if available.
Programmatic access to information about the AXObject Model
Store information about any JS value in a side channel, using a Map
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
Get and robustly cache all JS language-level intrinsics at first require time
ES6 spec-compliant RegExp.prototype.flags shim.
Which kind of boxed JS primitive is this?
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
Programmatic access to the ARIA specification
Get an iterator for any JS language value. Works robustly across all environments, all versions.
Is this value a JS SharedArrayBuffer?
Set a function's name property
Set a function's length property
Helper functions around Function call/apply/bind, for use in `call-bind`
Is this value an ES BigInt?
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Store information about any JS value in a side channel. Uses WeakMap if available.
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
A querystring parser that supports nesting and arrays, with a depth limit
Store information about any JS value in a side channel, using a linked list
Relationship graph
Dependencies (left) and dependents (right) of object-inspect.
Frequently installed together
An AST-based pattern checker for JavaScript.
A simple cache for a few of the JS Error constructors.
Get and robustly cache all JS language-level intrinsics at first require time
`Object.defineProperty`, but not IE 8's broken one.
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
A robust, ES3 compatible, "has own property" predicate.
Robustly `.call.bind()` a function
Store information about any JS value in a side channel. Uses WeakMap if available.
Implementation of Function.prototype.bind
Helper functions around Function call/apply/bind, for use in `call-bind`
Modern Buffer API polyfill without footguns
Release history
1 release in the last two years, typically about 138 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.13.4latest | 1 year ago | 101 KB | MIT |
| 1.13.3 | 1 year ago | 99 KB | MIT |
| 1.13.2 | 2 years ago | 97 KB | MIT |
| 1.13.1 | 2 years ago | 95 KB | MIT |
| 1.13.0 | 2 years ago | 95 KB | MIT |
| 1.12.3 | 3 years ago | 93 KB | MIT |
| 1.12.2 | 4 years ago | 91 KB | MIT |
| 1.12.1 | 4 years ago | 89 KB | MIT |
| 1.12.0 | 4 years ago | 88 KB | MIT |
| 1.11.1 | 4 years ago | 82 KB | MIT |
| 1.11.0 | 5 years ago | 55 KB | MIT |
| 1.10.3 | 5 years ago | 54 KB | MIT |
| 1.10.2 | 5 years ago | 51 KB | MIT |
| 1.10.1 | 5 years ago | 51 KB | MIT |
| 1.10.0 | 5 years ago | 50 KB | MIT |
Overview
object-inspect is an npm package that string representations of objects in node and the browser. It has 24 known dependents in the graph. The latest version is 1.13.4, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need string representations of objects in node and the browser and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- Large dependency tree (24 direct dependencies) increases install size and audit surface.
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Funding
Frequently asked questions
Should I use object-inspect?
object-inspect is usable, with caveats. Last published 582 days ago. 2 releases in the last 2 years.
How do I install object-inspect?
Run `npm install object-inspect` to add object-inspect to your npm project.
What license is object-inspect released under?
object-inspect is distributed under the MIT license.
How popular is object-inspect?
npm does not publish download counts. Within PackageGraph's crawl, 24 known packages depend on object-inspect.
Is object-inspect still maintained?
The most recent release of object-inspect (v1.13.4) was published 1 year ago.
Does object-inspect run install scripts?
No. object-inspect does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.