@zkochan/pnpm
Version:
Fast, disk space efficient package manager
95 lines (94 loc) • 5.97 kB
JSON
{
"_args": [
[
{
"raw": "byline@^5.0.0",
"scope": null,
"escapedName": "byline",
"name": "byline",
"rawSpec": "^5.0.0",
"spec": ">=5.0.0 <6.0.0",
"type": "range"
},
"/home/zkochan/src/pnpm/packages/pnpm/node_modules/@zkochan/npm-lifecycle"
]
],
"_from": "byline@>=5.0.0 <6.0.0",
"_id": "byline@5.0.0",
"_inCache": true,
"_location": "/byline",
"_nodeVersion": "5.6.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/byline-5.0.0.tgz_1469083893025_0.6156890068668872"
},
"_npmUser": {
"name": "jahewson",
"email": "john@jahewson.com"
},
"_npmVersion": "3.6.0",
"_phantomChildren": {},
"_requested": {
"raw": "byline@^5.0.0",
"scope": null,
"escapedName": "byline",
"name": "byline",
"rawSpec": "^5.0.0",
"spec": ">=5.0.0 <6.0.0",
"type": "range"
},
"_requiredBy": [
"#DEV:/",
"/@zkochan/npm-lifecycle"
],
"_resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz",
"_shasum": "741c5216468eadc457b03410118ad77de8c1ddb1",
"_shrinkwrap": null,
"_spec": "byline@^5.0.0",
"_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/@zkochan/npm-lifecycle",
"author": {
"name": "John Hewson"
},
"bugs": {
"url": "https://github.com/jahewson/node-byline/issues"
},
"dependencies": {},
"description": "simple line-by-line stream reader",
"devDependencies": {
"mocha": "~2.1.0",
"request": "~2.27.0"
},
"directories": {},
"dist": {
"shasum": "741c5216468eadc457b03410118ad77de8c1ddb1",
"tarball": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"lib"
],
"gitHead": "3335926be164882b8d12ea9f4ac9f44c083bc3fc",
"homepage": "https://github.com/jahewson/node-byline",
"license": "MIT",
"main": "./lib/byline.js",
"maintainers": [
{
"name": "jahewson",
"email": "johnahewson@yahoo.co.uk"
}
],
"name": "byline",
"optionalDependencies": {},
"readme": "# byline — buffered stream for reading lines\n\n\n\n`byline` is a simple module providing a `LineStream`.\n\n- node v0.10 `streams2` (transform stream)\n- supports `pipe`\n- supports both UNIX and Windows line endings\n- supports [Unicode UTS #18 line boundaries](http://www.unicode.org/reports/tr18/#Line_Boundaries)\n- can wrap any readable stream\n- can be used as a readable-writable \"through-stream\" (transform stream)\n- super-simple: `stream = byline(stream);`\n\n## Install\n\n npm install byline\n\nor from source:\n\n git clone git://github.com/jahewson/node-byline.git\n cd node-byline\n npm link\n\n# Convenience API\n\nThe `byline` module can be used as a function to quickly wrap a readable stream:\n\n```javascript\nvar fs = require('fs'),\n byline = require('byline');\n\nvar stream = byline(fs.createReadStream('sample.txt', { encoding: 'utf8' }));\n```\n\nThe `data` event then emits lines:\n\n```javascript\nstream.on('data', function(line) {\n console.log(line);\n});\n```\n\n# Standard API\n \nYou just need to add one line to wrap your readable `Stream` with a `LineStream`.\n\n```javascript\nvar fs = require('fs'),\t\n byline = require('byline');\n\nvar stream = fs.createReadStream('sample.txt');\nstream = byline.createStream(stream);\n\nstream.on('data', function(line) {\n console.log(line);\n});\n```\n\n# Piping\n\n`byline` supports `pipe` (though it strips the line endings, of course).\n\n```javascript\nvar stream = fs.createReadStream('sample.txt');\nstream = byline.createStream(stream);\nstream.pipe(fs.createWriteStream('nolines.txt'));\n```\n\nAlternatively, you can create a readable/writable \"through-stream\" which doesn't wrap any specific\nstream:\n\n```javascript\nvar stream = fs.createReadStream('sample.txt');\nstream = byline.createStream(stream);\nstream.pipe(fs.createWriteStream('nolines.txt'));\n\t\nvar input = fs.createReadStream('LICENSE');\nvar lineStream = byline.createStream();\ninput.pipe(lineStream);\n\nvar output = fs.createWriteStream('test.txt');\nlineStream.pipe(output);\n```\n\n# Streams2 API\n \nNode v0.10 added a new streams2 API. This allows the stream to be used in non-flowing mode and is\npreferred over the legacy pause() and resume() methods.\n\n```javascript\nvar stream = fs.createReadStream('sample.txt');\nstream = byline.createStream(stream);\n\nstream.on('readable', function() {\n var line;\n while (null !== (line = stream.read())) {\n console.log(line);\n }\n});\n```\n\n# Transform Stream\n\nThe `byline` transform stream can be directly manipulated like so:\n\n```javascript\nvar LineStream = require('byline').LineStream;\n\nvar input = fs.createReadStream('sample.txt');\nvar output = fs.createWriteStream('nolines.txt');\n\nvar lineStream = new LineStream();\ninput.pipe(lineStream);\nlineStream.pipe(output);\n\n```\n\n# Empty Lines\n\nBy default byline skips empty lines, if you want to keep them, pass the `keepEmptyLines` option in\nthe call to `byline.createStream(stream, options)` or `byline(stream, options)`.\n\n# Tests\n\n npm test\n\n# v0.8\n\nIf you want to use `node-byline` with node v0.8 then you can use the 2.1.x series. Simply use the\nfollowing in your `package.json`:\n\n```javascript\n \"dependencies\": {\n \"byline\": \">=2.1.0 <3.0.0\"\n},\n```\n\n# Simple\nUnlike other modules (of which there are many), `byline` contains no:\n\n- monkeypatching\n- dependencies\n- non-standard 'line' events which break `pipe`\n- limitations to only file streams\n- CoffeeScript\n- unnecessary code\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/jahewson/node-byline.git"
},
"scripts": {
"test": "mocha -R spec --timeout 60000"
},
"version": "5.0.0"
}