motion
Version:
motion - moving development forward
66 lines (65 loc) • 3.08 kB
JSON
{
"_args": [
[
"split@https://registry.npmjs.org/split/-/split-0.3.1.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "split@0.3.1",
"_id": "split@0.3.1",
"_inCache": true,
"_location": "/split",
"_phantomChildren": {},
"_requested": {
"name": "split",
"raw": "split@https://registry.npmjs.org/split/-/split-0.3.1.tgz",
"rawSpec": "https://registry.npmjs.org/split/-/split-0.3.1.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/split/-/split-0.3.1.tgz",
"type": "remote"
},
"_requiredBy": [
"/surge"
],
"_resolved": "https://registry.npmjs.org/split/-/split-0.3.1.tgz",
"_shasum": "cebcf142bf61bbb64b141628e6db482a2914654c",
"_shrinkwrap": null,
"_spec": "split@https://registry.npmjs.org/split/-/split-0.3.1.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"email": "dominic.tarr@gmail.com",
"name": "Dominic Tarr",
"url": "http://bit.ly/dominictarr"
},
"bugs": {
"url": "https://github.com/dominictarr/split/issues"
},
"dependencies": {
"through": "2"
},
"description": "split a Text Stream into a Line Stream",
"devDependencies": {
"asynct": "*",
"event-stream": "~3.0.2",
"it-is": "1",
"stream-spec": "~0.2",
"ubelt": "~2.9"
},
"engines": {
"node": "*"
},
"homepage": "http://github.com/dominictarr/split",
"license": "MIT",
"name": "split",
"optionalDependencies": {},
"readme": "# Split (matcher)\n\n[](http://travis-ci.org/dominictarr/split)\n\nBreak up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` \n\nExample, read every line in a file ...\n\n``` js\n fs.createReadStream(file)\n .pipe(split())\n .on('data', function (line) {\n //each chunk now is a seperate line!\n })\n\n```\n\n`split` takes the same arguments as `string.split` except it defaults to '/\\r?\\n/' instead of ',', and the optional `limit` paremeter is ignored.\n[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)\n\n`split` takes an optional options object on it's third argument.\n\n``` js\n split(matcher, mapper, options)\n```\n\nValid options:\n\n* maxLength - The maximum buffer length without seeing a newline or `matcher`,\n if a single line exceeds this, the split stream will emit an error.\n\n``` js\n split(JSON.parse, null, { maxLength: 2})\n```\n\n# NDJ - Newline Delimited Json\n\n`split` accepts a function which transforms each line.\n\n``` js\nfs.createReadStream(file)\n .pipe(split(JSON.parse))\n .on('data', function (obj) {\n //each chunk now is a a js object\n })\n .on('error', function (err) {\n //syntax errors will land here\n //note, this ends the stream.\n })\n```\n\n# License\n\nMIT\n",
"readmeFilename": "readme.markdown",
"repository": {
"type": "git",
"url": "git://github.com/dominictarr/split.git"
},
"scripts": {
"test": "asynct test/"
},
"version": "0.3.1"
}