Back to Explore

inspect-js/object-inspect

GitHub
2 watchersOpen source

Last release:

Provides string representations of JavaScript objects for both Node.js and browser environments. Useful for inspecting values in logs and debugging, including handling circular references and DOM elements, via an `inspect(obj, opts)` function with options like depth and string formatting.

Project status

  • Maintenance status: The upstream GitHub repo shows a recent push on 2026-04-26, suggesting it is still maintained, even though a new published version is not reflected in the provided release history since 2025-02-05.
  • updates cadence: Published updates appear infrequent (for example, v1.13.3 on 2024-11-09, v1.13.4 on 2025-02-05), with a gap of about 16 months from the last shown version to today (2026-06-09).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.13.4

    Version v1.13.4 primarily changes how object-inspect determines the underlying type of boxed values (Array, Date, RegExp, Error, String, Number, Boolean) when Symbol.toStringTag is involved. The core logic was updated to avoid being fooled by Symbol.toStringTag, particularly for Proxy objects that can manipulate the `in` operator behavior, and regression tests were added for these cases.

  • v1.13.3

    v1.13.3 makes a targeted fix to how `inspect` escapes characters when `quoteStyle` is set, and adds test coverage for those cases. The release also updates GitHub Actions test matrices and bumps several development dependencies.

  • v1.13.2

    Release v1.13.2 was published on 2024-06-22, but no release notes were provided by the publisher. Because no change details are documented here, developers should review the GitHub release diff and changelog to determine whether there are any API, behavior, or dependency changes before upgrading.

  • v1.10.3

    v1.10.3 is a patch release that claims to fix inspection behavior when running under core-js Symbol shams. The code changes specifically detect shammed Symbol.iterator/boxing behavior and adjust symbol inspection and object key handling to avoid incorrect symbol formatting.

  • v1.10.2

    v1.10.2 updates the object inspection logic in `object-inspect` to use more robust checks around Symbols, especially to prevent boxed or spoofed Symbol-like values from being misidentified. The release notes only mention boxed Symbol handling, but the code changes also tighten other type/tag detection paths that can affect inspection output.

  • v1.10.1

    v1.10.1 updates object-inspect's BigInt detection to use a more robust runtime check for boxed BigInt-like objects. The change also adds coverage to ensure objects that spoof Symbol.toStringTag as 'BigInt' are not misidentified as BigInt primitives.

  • v1.10.0

    v1.10.0 of object-inspect adds support for inspecting WeakRef objects and improves how inspection output reflects Symbol.toStringTag, including for instances and null-prototype objects. The change also prevents Symbol.toStringTag from causing non-builtins to be treated as built-in types (for example, masquerading an object as an Array).

    Features
  • v1.9.0

    v1.9.0 updates object-inspect output to better match Node’s assert behavior, including showing enumerable symbol properties and enumerable function properties, and uppercasing hex escapes in strings. It also includes test and CI workflow migrations plus dev dependency updates.

    BreakingFeatures
  • v1.8.0

    v1.8.0 adds several new `inspect` options, including `indent`, `customInspect`, and `maxStringLength`, plus formatting and correctness fixes (anonymous functions, array truncation, and resisting spoofed `Function.prototype.toString`). The implementation also expands test and CI coverage for dates, regexps, weak collections, and indentation behavior.

    Features
  • v1.7.0

    v1.7.0 adds support for inspecting WeakMap and WeakSet objects, alongside a small refactor to speed up Map and Set detection. It also updates dev tooling, CI configuration, and test scripts, including linting and running `npx aud` in `posttest`.

    Features
  • v1.6.0

    v1.6.0 adds support for inspecting BigInt values, including both primitive BigInts and boxed BigInt objects. It also updates dev dependencies (core-js, tape), extends CI test coverage to include a bigint test run with Node's --harmony-bigint flag, and updates the documentation example to use safer-buffer APIs.

    Features
  • v1.5.0

    v1.5.0 adds support for a new `quoteStyle` option to control whether strings (and some markup attributes) are rendered with single or double quotes. It also updates the CI test matrix to require Node 0.6 and adds additional test coverage around the new option.

    Features
  • v1.4.1

    v1.4.1 fixes formatting of boxed negative zero so `inspect(Object(-0))` returns `"Object(-0)"` instead of `"Object(0)"`. It also updates the CI test matrix to run against newer Node.js versions (up to 9.3, 8.9, and 6.12 as noted).