Socket
Socket
Sign inDemoInstall

ndjson

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndjson - npm Package Compare versions

Comparing version 1.4.4 to 1.5.0

5

index.js
var through = require('through2')
var split = require('split2')
var EOL = require('os').EOL
var stringify = require('json-stringify-safe')

@@ -23,3 +24,3 @@ module.exports = parse

return split(parseRow)
return split(parseRow, opts)
}

@@ -29,4 +30,4 @@

return through.obj(opts, function(obj, enc, cb) {
cb(null, JSON.stringify(obj) + EOL)
cb(null, stringify(obj) + EOL)
})
}

3

package.json
{
"name": "ndjson",
"version": "1.4.4",
"version": "1.5.0",
"description": "streaming newline delimited json parser + serializer",

@@ -15,2 +15,3 @@ "main": "index.js",

"dependencies": {
"json-stringify-safe": "^5.0.1",
"minimist": "^1.2.0",

@@ -17,0 +18,0 @@ "split2": "^2.1.0",

@@ -74,1 +74,13 @@ var test = require('tape')

})
test('.serialize circular', function(t) {
var serializer = ndj.serialize()
serializer.pipe(concat(function(data) {
t.equal(data, '{"obj":"[Circular ~]"}' + os.EOL)
t.end()
}))
var obj = {}
obj.obj = obj
serializer.write(obj)
serializer.end()
})
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