json-stringify-safe
npmv5.0.1Like JSON.stringify, but doesn't blow up on circular refs.
Not recommended for new projects
No — json-stringify-safe should not be adopted for new projects. Last published 4083 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 4083 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
ISC — 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 json-stringify-safe 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
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the json-stringify-safe README.
var stringify = require('json-stringify-safe');
var circularObj = {};
circularObj.circularRef = circularObj;
circularObj.list = [ circularObj, circularObj ];
console.log(stringify(circularObj, null, 2));json-stringify-safe 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 |
|---|---|---|---|---|
| json-stringify-safethis page | 0 | 1 | ISC | 11 years ago |
| jsesc | 0 | 1 | MIT | 4 hours ago |
| fast-json-stable-stringify | 0 | 2 | MIT | 4 hours ago |
| fast-json-stringify | 0 | 3 | MIT | 4 hours ago |
| json-stable-stringify-without-jsonify | 0 | 1 | MIT | 4 hours ago |
| @nodable/entities | 0 | 2 | MIT | 4 hours ago |
Dependencies
Declared by json-stringify-safe v5.0.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on json-stringify-safe.
Relationship graph
Dependencies (left) and dependents (right) of json-stringify-safe.
Frequently installed together
A querystring parser that supports nesting and arrays, with a depth limit
A stream that emits multiple other streams one after another.
Signs and prepares requests using AWS Signature Version 4
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
Implementation of Function.prototype.bind
Port of jQuery.extend for node.js and the browser
Reference implementation of Joyent's HTTP Signature scheme.
Implements performance.now (based on process.hrtime).
OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.
Detect whether or not an object is a Typed Array
Caseless object set/get/has, very useful when working with HTTP headers.
HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.
Release history
No releases in the last two years, typically about 143 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.0.1latest | 11 years ago | — | ISC |
| 5.0.0 | 13 years ago | — | BSD |
| 4.0.0 | 13 years ago | — | BSD |
| 3.0.0 | 13 years ago | — | BSD |
| 2.0.0 | 13 years ago | — | BSD |
Overview
json-stringify-safe is an npm package that like JSON.stringify, but doesn't blow up on circular refs. It has 1 known dependents in the graph. The latest version is 5.0.1, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need like JSON.stringify, but doesn't blow up on circular refs and value a focused solution.
When not to use it
Consider an alternative if you need to 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 (ISC).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use json-stringify-safe?
No — json-stringify-safe should not be adopted for new projects. Last published 4083 days ago.
How do I install json-stringify-safe?
Run `npm install json-stringify-safe` to add json-stringify-safe to your npm project.
What license is json-stringify-safe released under?
json-stringify-safe is distributed under the ISC license.
How popular is json-stringify-safe?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on json-stringify-safe.
Is json-stringify-safe still maintained?
The most recent release of json-stringify-safe (v5.0.1) was published 11 years ago.
Does json-stringify-safe run install scripts?
No. json-stringify-safe does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.