Comments (5)
The main use case for this package is to create the same string from the deep-equal objects to be used as a key - in this case the space option is NOT needed (and it only impacts performance).
If the object is stringified for the presentation the normal JSON can be used, can't it?
@epoberezkin I’m not sure how representative this is, but my use case also requires space
. I dynamically create a large object from scraped content, and check it into source control. Diffs are huge if the saved JSON is a single line. They are usually a single line with a stable property order… but I need to pass in space
for that to work.
from fast-json-stable-stringify.
Same here, I stable stringify to see diffs in my tests. I don't want to look at one line JSON files.
from fast-json-stable-stringify.
The main use case for this package is to create the same string from the deep-equal objects to be used as a key - in this case the space option is NOT needed (and it only impacts performance).
If the object is stringified for the presentation the normal JSON can be used, can't it?
from fast-json-stable-stringify.
This was mostly raised for webpack
use, but they decided to go in another direction. Sorry for the bother.
from fast-json-stable-stringify.
I'd still be interested in this. It is correct that I want stable JSON for (test comparisons), but I also need them to be human-readable.
from fast-json-stable-stringify.
Related Issues (9)
- TypeScript definition does not include opt HOT 2
- Update Typescript declaration file to use standard export syntax. HOT 1
- Reduce the size of the npm package by limiting the included files HOT 4
- Prototype pollution HOT 7
- Performance increase with different design HOT 2
- npm package should contain index.d.ts file
- String instances are transformed into objects
- Exporting as ES Module Syntax (ESM) HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-json-stable-stringify.