UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

105 lines (104 loc) 3.69 kB
{ "_args": [ [ { "raw": "ndjson@^1.5.0", "scope": null, "escapedName": "ndjson", "name": "ndjson", "rawSpec": "^1.5.0", "spec": ">=1.5.0 <2.0.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/@pnpm/logger" ] ], "_from": "ndjson@>=1.5.0 <2.0.0", "_id": "ndjson@1.5.0", "_inCache": true, "_location": "/ndjson", "_nodeVersion": "7.1.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/ndjson-1.5.0.tgz_1480945705636_0.05483738542534411" }, "_npmUser": { "name": "finnpauls", "email": "derfinn@gmail.com" }, "_npmVersion": "3.10.9", "_phantomChildren": {}, "_requested": { "raw": "ndjson@^1.5.0", "scope": null, "escapedName": "ndjson", "name": "ndjson", "rawSpec": "^1.5.0", "spec": ">=1.5.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/@pnpm/logger", "/csv-parser" ], "_resolved": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz", "_shasum": "ae603b36b134bcec347b452422b0bf98d5832ec8", "_shrinkwrap": null, "_spec": "ndjson@^1.5.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/@pnpm/logger", "author": { "name": "max ogden" }, "bin": { "ndjson": "cli.js" }, "bugs": { "url": "https://github.com/maxogden/ndjson/issues" }, "dependencies": { "json-stringify-safe": "^5.0.1", "minimist": "^1.2.0", "split2": "^2.1.0", "through2": "^2.0.3" }, "description": "streaming newline delimited json parser + serializer", "devDependencies": { "concat-stream": "^1.5.0", "tape": "^4.6.3" }, "directories": {}, "dist": { "shasum": "ae603b36b134bcec347b452422b0bf98d5832ec8", "tarball": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz" }, "gitHead": "2bb834d45e1ff8894356e0f36e8d00dbf2c8a063", "homepage": "https://github.com/maxogden/ndjson", "keywords": [ "ndjson", "ldjson" ], "license": "BSD-3-Clause", "main": "index.js", "maintainers": [ { "name": "maxogden", "email": "max+DONT+EMAIL+ME@maxogden.com" }, { "name": "finnpauls", "email": "derfinn@gmail.com" } ], "name": "ndjson", "optionalDependencies": {}, "readme": "# ndjson\n\nstreaming [newline delimited json](https://en.wikipedia.org/wiki/Line_Delimited_JSON) parser + serializer. Available as a JS API or a command line tool\n\n[![NPM](https://nodei.co/npm/ndjson.png)](https://nodei.co/npm/ndjson/)\n\n## usage\n\n```\nvar ndjson = require('ndjson')\n```\n\n#### ndjson.parse(opts)\n\nreturns a transform stream that accepts newline delimited json and emits objects\n\nexample newline delimited json:\n\n`data.txt`:\n\n```\n{\"foo\": \"bar\"}\n{\"hello\": \"world\"}\n```\n\nIf you want to discard non-valid JSON messages, you can call `ndjson.parse({strict: false})`\n\nusage:\n\n```js\nfs.createReadStream('data.txt')\n .pipe(ndjson.parse())\n .on('data', function(obj) {\n // obj is a javascript object\n })\n```\n\n#### ndjson.serialize() / ndjson.stringify()\n\nreturns a transform stream that accepts json objects and emits newline delimited json\n\nexample usage:\n\n```js\nvar serialize = ndjson.serialize()\nserialize.on('data', function(line) {\n // line is a line of stringified JSON with a newline delimiter at the end\n})\nserialize.write({\"foo\": \"bar\"})\nserialize.end()\n```\n\n### license\n\nBSD-3-Clause\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git://github.com/maxogden/ndjson.git" }, "scripts": { "test": "tape test.js" }, "version": "1.5.0" }