A small helper that optimistically sets an object’s `Symbol.toStringTag` value (when possible), so `Object.prototype.toString.call(obj)` reflects the provided tag. It supports options like `force` (set even if already set) and `nonConfigurable` (define as non-configurable when possible), useful for improving type branding in JavaScript.
Project status
- The repository appears actively maintained, with a recent update on 2025-01-02 (v2.1.0), and earlier updates in 2024-02-20 (v2.0.3) and 2023-10-21 (v2.0.2).
- Update cadence looks irregular but present, roughly every few months to about a year (2023-10 to 2024-02, then 2024-02 to 2025-01).
AI summary generated Today
Recent updates
v2.1.0
1/2/2025The publisher did not provide any release notes for v2.1.0 (release notes were listed as none provided). Reviewing the code diff shows v2.1.0 adds a new option, nonConfigurable, and introduces stricter runtime validation for the options argument passed to setToStringTag.
BreakingFeaturesv2.0.3
2/20/2024v2.0.3 primarily adds TypeScript support by introducing a new index.d.ts file and wiring TypeScript into the repo lint process. The runtime JavaScript diff is effectively only a JSDoc typing hint, while dependencies are bumped in package.json.
Featuresv2.0.2
10/21/2023Release v2.0.2 was published on 2023-10-21, but no release notes or change details were provided by the publisher. As a result, there is insufficient information to determine new features, breaking changes, bug fixes, security updates, performance improvements, or migration steps.
v2.0.1
1/5/2023No release notes content was provided for v2.0.1, so the documented changes are effectively missing. The code diff shows a version bump plus dependency and packaging changes, notably moving `has` from devDependencies to runtime dependencies.
v2.0.0
12/21/2022Version 2.0.0 changes the behavior of setToStringTag so it will no longer overwrite Symbol.toStringTag when the object already has it set. It introduces a third-argument option to force overriding, and expands the test coverage accordingly.
BreakingFeaturesv1.0.0
12/21/2022This release is tagged v1.0.0, but the publisher did not provide any release notes. Without documented changes, there is no actionable information available to determine new features, fixes, breaking changes, or required migrations.