{
  "name": "slice-stream",
  "version": "1.0.0",
  "description": "Pipe data through a stream until some fixed length is reached, then callback.",
  "main": "slicestream.js",
  "directories": {
    "example": "examples",
    "test": "test"
  },
  "scripts": {
    "test": "tap ./test/*.js"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/EvanOxfeld/slice-stream.git"
  },
  "keywords": [
    "slice",
    "fixed",
    "length",
    "stream",
    "split"
  ],
  "author": {
    "name": "Evan Oxfeld",
    "email": "eoxfeld@gmail.com"
  },
  "license": "MIT",
  "readmeFilename": "README.md",
  "gitHead": "9054cbab67c2e71ab9241dbe88401c786b270f8e",
  "dependencies": {
    "readable-stream": "~1.0.31"
  },
  "devDependencies": {
    "stream-buffers": ">= 0.2.4 < 1",
    "tap": ">= 0.4.0 < 1"
  },
  "readme": "slice-stream [![Build Status](https://travis-ci.org/EvanOxfeld/slice-stream.png)](https://travis-ci.org/EvanOxfeld/slice-stream)\n============\n\nPipe data through a stream until some fixed length is reached, then callback.\n\n## Installation\n\n```bash\n$ npm install slice-stream\n```\n\n## Quick Example\n\n### End stream once a fixed length has been reached\n\n```javascript\nvar SliceStream = require('../');\nvar streamBuffers = require(\"stream-buffers\");\n\nvar ss = new SliceStream({ length: 5}, function (buf, sliceEnd, extra) {\n  if (!sliceEnd) {\n    return this.push(buf);\n  }\n  this.push(buf);\n  return this.push(null); //signal end of data\n});\n\nvar sourceStream = new streamBuffers.ReadableStreamBuffer();\nsourceStream.put(\"Hello World\");\nvar writableStream = new streamBuffers.WritableStreamBuffer();\n\nsourceStream\n  .pipe(ss)\n  .pipe(writableStream)\n  .once('close', function () {\n    var str = writableStream.getContentsAsString('utf8');\n    console.log('First 5 bytes piped:', \"'\" + str + \"'\");\n    sourceStream.destroy();\n  });\n\n//Output\n//Piped data before pattern occurs: 'Hello'\n```\n\n## License\n\nMIT",
  "bugs": {
    "url": "https://github.com/EvanOxfeld/slice-stream/issues"
  },
  "homepage": "https://github.com/EvanOxfeld/slice-stream",
  "_id": "slice-stream@1.0.0",
  "_shasum": "5b33bd66f013b1a7f86460b03d463dec39ad3ea0",
  "_from": "slice-stream@>= 1.0.0 < 2",
  "_resolved": "https://registry.npm.taobao.org/slice-stream/download/slice-stream-1.0.0.tgz"
}
