Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

streaming-json-stringify

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streaming-json-stringify - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

8

index.js

@@ -28,11 +28,13 @@

// Array Deliminator defaults
// Array Deliminator and Stringifier defaults
var opener = options && options.opener ? options.opener : '[\n'
var seperator = options && options.seperator ? options.seperator : '\n,\n'
var closer = options && options.closer ? options.closer : '\n]\n'
var stringifier = options && options.stringifier ? options.stringifier : stringify
// Array Deliminators
// Array Deliminators and Stringifier
this.opener = new Buffer(opener, 'utf8')
this.seperator = new Buffer(seperator, 'utf8')
this.closer = new Buffer(closer, 'utf8')
this.stringifier = stringifier
}

@@ -55,3 +57,3 @@

doc = stringify(doc, this.replacer, this.space)
doc = this.stringifier(doc, this.replacer, this.space)

@@ -58,0 +60,0 @@ this.push(new Buffer(doc, 'utf8'))

{
"name": "streaming-json-stringify",
"description": "Streaming JSON.stringify()",
"version": "3.0.0",
"version": "3.1.0",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -9,5 +9,6 @@ "repository": "stream-utils/streaming-json-stringify",

"devDependencies": {
"cat-stream": "*",
"istanbul": "0",
"mocha": "2",
"istanbul": "0",
"cat-stream": "*"
"sinon": "^1.17.2"
},

@@ -14,0 +15,0 @@ "scripts": {

@@ -47,2 +47,6 @@ # Streaming JSON.stringify()

## Stringifier
By default, [json-stringify-safe](https://www.npmjs.com/package/json-stringify-safe) is used to convert objects into strings. This can be configured with `options.stringifier`.
## API

@@ -66,2 +70,3 @@

stringify.closer = ']'
stringify.stringifier = JSON.stringify
```

@@ -68,0 +73,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc