{"_id":"parted","_rev":"31-1b641d8531b4cc586676a846f0e9abe0","name":"parted","description":"A streaming body parser","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"parted","description":"A streaming multipart parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.1","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","middleware"],"_npmJsonOpts":{"file":"/home/cjj/.npm/parted/0.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"parted@0.0.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"dbde4f61d054465d38c6fd3c9afac5735cd4f36d","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.1.tgz","integrity":"sha512-p8zkvniLKJiPZ9HOwn13Cx72UWR2w2ts9REtEmcrBHZncHZqdRmNXFBkU7yvMTY86ljMvQzCMecdFq2nQOzd2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIENesp9SlXKS/6yddAGruQ6X8dzmVVDzd2RQIS49BD1HAiEAqryiGIpg21PN7dua6ZQw5TzOCXeKHyZAGkABAxInVms="}]},"scripts":{},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"}},"0.0.2":{"name":"parted","description":"A streaming multipart parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.2","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","middleware"],"_npmJsonOpts":{"file":"/home/cjj/.npm/parted/0.0.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"parted@0.0.2","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"8360480a768165eef9d871a78f2d95f1e71e7935","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.2.tgz","integrity":"sha512-w+X2ie5YU/Lh3WQoXveEVFHxFC+37n9cr+31NU44mnt3P5j3rimhp2l7xwurAuDHSlR/9LX7nZ08lnoVJn35mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBh52r4pGsN1Ye1NvPECflFseva9JBX/T/kSTvlvWwZMAiAJSa0PKYzY3ce4+2KAawvSvZICFWPL3MPVC+Hy9czXWg=="}]},"scripts":{},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"}},"0.0.3":{"name":"parted","description":"A streaming multipart parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.3","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","middleware"],"_npmJsonOpts":{"file":"/home/cjj/.npm/parted/0.0.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"parted@0.0.3","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"2027cba0ee8646a7507da5642ce6e03aab287d9f","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.3.tgz","integrity":"sha512-VDNvjziskJfCWTV7KS6ejR67S41mK33/0U8NU70wotvw2uLWMZ+UdqrR2PZVBorwGB5z3EfC/7RjIbfOK0RMdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+L4IRik2fU91oSi0dpO2ENf6IcvccTLFjBKtspWVTxAIgc5S4JLl8sO3ukvvvKRfT7DIk8oEYwWO+WYFHtndAmQQ="}]},"scripts":{},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"}},"0.0.4":{"name":"parted","description":"A streaming multipart parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.4","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","middleware"],"_npmJsonOpts":{"file":"/home/cjj/.npm/parted/0.0.4/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"parted@0.0.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"ef7ab069bfbded04cebe1310c06bb84194c47259","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.4.tgz","integrity":"sha512-TyK5ce+kkMZoIqAcTqS+Jceat6M5+BciJYCe9veWyn+OtJpMwehGrcmfcOifPN8ZBe8H2jE9F+8dw2ffYUxhdw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgmXo9/rcj0XHUpKP11Txoy1gCfBjlf4c9wGBPJoVEeQIhAL0Gn6rb1aXkVMDUzFGP1UneQCtdp3V238okvaFGUdNg"}]},"scripts":{},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"}},"0.0.5":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.5","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"_npmJsonOpts":{"file":"/home/cjj/.npm/parted/0.0.5/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"parted@0.0.5","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"55d40775749aa05a549572b83839358bfbc6a8bc","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.5.tgz","integrity":"sha512-NeGChz+naYt5FTZQVVvhxI0SXYhkt8c2NLXaicOsgO5oK92oZE2S8tZ+q0WW1Hsmxg9vcJUO/MjhuE/CMbfk5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHLpt6u2bbiU29dgakq8NjyxTOA+mzTFclsMbOUO1c5PAiA+8+lNAS+hIrXbOLzjrcK5mIJQ6S+xYLJYB/XOTXizfA=="}]},"scripts":{},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"}},"0.0.6":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.6","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"_npmJsonOpts":{"file":"/home/cjj/.npm/parted/0.0.6/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"parted@0.0.6","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"2a0c16f99e909fcb299977174bb327ceb89425a3","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.6.tgz","integrity":"sha512-Z1pppSKWPYjVkpx8CWV5MTVMnp6FlHzDcEo8TKMBCV1HA8/ujXAGQiNQKnv7r4FtFaR/dUqEZMpMLeBAm0hRsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHiPUtZTNLJt+bDkFx0Wvy+UEPJOXDaUNysJF3CGENtwAiAz5c4XBuhpGsWZRjWDzOJU6e6yojQ8yG9oG4uz41UA+g=="}]},"scripts":{},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"}},"0.0.7":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.7","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"_id":"parted@0.0.7","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.5.10","_defaultsLoaded":true,"dist":{"shasum":"b7d81afd15b8613432c8ac49cb0227b8c51546bd","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.7.tgz","integrity":"sha512-s3PnxA6ENAy9e4RqitMJC6egJsGnkGjVtBLMsaQPtL3bpKvyI59bc5VB8MmlNwM9t/80ExhJ1WEzUV9du3VMjA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaRx3j1bhw7tXOtLg3ny5U94/MvQdZWdW1Upc4ko+cYAIgOZbKJ6KTJFGhYWjmu9KJc2xbowLazHC6tZadf1R3ARU="}]},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"directories":{}},"0.0.8":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.8","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"dependencies":{"qs":"*"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"_id":"parted@0.0.8","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"cbb4ae46646c939a7d44fb91fd520adf0106ca33","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.8.tgz","integrity":"sha512-dQMmNRN1+B7xKLsPOJdIA5BHqcpjNoVIATvlL+EYO6jn8YFF1gsOqsXhDM0eE9OKVhWn/zMItQVHzb2XPwpLWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6pDVigSo2OX2niE3kGUFs6zxViSjAboCA++TrDyqgbAiEAgaolv/SjXC+NLKHWxQhddBmB8PMK8hYVOCdO4Ri4S8Q="}]},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}]},"0.0.9":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.0.9","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"_id":"parted@0.0.9","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-2","_nodeVersion":"v0.6.3","_defaultsLoaded":true,"dist":{"shasum":"0953ef45c2b947aa0540f34e5d6afa5be0328e91","tarball":"https://registry.npmjs.org/parted/-/parted-0.0.9.tgz","integrity":"sha512-rxUdPfOjzpatMyfIzDd2opQidn3yNxDaxETmea0gCSR1MTsbVMCBGL2yV8ah0odNT9CZxYWadYSgWD6cPEXsxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFIo+u4AxhTGH9Bjl7DiZOw8fl920bqnXDwVgRAOp0jAiAXe80ysyjOqOB9kggYXSZqhnxlQXfrI95rUBhDnZwmmA=="}]},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}]},"0.1.0":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.1.0","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"tags":["multipart","parser","http","express","middleware"],"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"_id":"parted@0.1.0","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"a6d6edc9460b0b487f97ccfdf912dc32a27aa516","tarball":"https://registry.npmjs.org/parted/-/parted-0.1.0.tgz","integrity":"sha512-EXTB68MjPaWgjFQ8B5GaGGlH0Z2SejnxxPXBAHdbdMys0ywd70FA3egGSwGfQSuv3hwYbqvTon/+vAOdv05hGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwNzzUR4+exkOS8DyKm1LhsEB2Zp2UaWxWWX4DPwHZ3AiADoW+cyh9mfsXCYSOqT8mq0YvhgwCnPD0kPSKaa9eVfw=="}]},"readme":"# parted\n\nParted is a streaming multipart, json, and urlencoded parser for node.js,\nwritten from scratch. It comes bundled with an express middleware which\nwill use the necessary parser depending on the request mime type. Each parser\nis also lazily loaded, so there is no unnecessary memory usage if you only need\none of them.\n\nThe middleware will leave you with a `req.body` object, similar to the default\nbody parser included in express. If a file was included with a multipart\nrequest, a temporary path to the uploaded file is provided in `req.body`.\nThe multipart parser will also create a `req.files` object specifically for\nfiles if you prefer.\n\nEvery parser handles nested fields in the same way `node-querystring` does.\n\n*Note;* Although the JSON and qs/encoded parsers are streaming, they're disabled\nby default and buffering parsers are used instead. Use the `stream` option to\nenable them.\n\n## Install\n\n``` bash\n$ npm install parted\n```\n\n## As a middleware\n\n``` js\nvar parted = require('parted');\n\napp.use(parted({\n  // custom file path\n  path: __dirname + '/uploads',\n  // memory usage limit per request\n  limit: 30 * 1024,\n  // disk usage limit per request\n  diskLimit: 30 * 1024 * 1024,\n  // enable streaming for json/qs\n  stream: true\n}));\n```\n\nWhen `multiple` is disabled only a single part will be present\nfor a given name, for example:\n\n```js\n{ image: '/tmp/bigred.1319577761529.png' }\n```\n\nHowever when `multiple` is enabled, this _may_ be an array:\n\n```js\n{ images:\n   [ '/tmp/bigred-pau.1319577761529.png',\n     '/tmp/bigred-ico.1319577761528.png',\n     '/tmp/bigred-rec.1319577761529.png',\n     '/tmp/bigred-sto.1319577761529.png',\n     '/tmp/bigred.1319577761529.png' ] }\n```\n\n## Usage\n\n### The multipart parser alone\n\n``` js\nvar multipart = require('parted').multipart;\n\nvar options = {\n  limit: 30 * 1024,\n  diskLimit: 30 * 1024 * 1024\n};\n\nvar parser = new multipart(type, options)\n  , parts = {};\n\nparser.on('error', function(err) {\n  req.destroy();\n  next(err);\n});\n\nparser.on('part', function(field, part) {\n  // temporary path or string\n  parts[field] = part;\n});\n\nparser.on('data', function() {\n  console.log('%d bytes written.', this.written);\n});\n\nparser.on('end', function() {\n  console.log(parts);\n});\n\nreq.pipe(parser);\n```\n\n## Running tests\n\n    $ node test\n\n","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}]},"0.1.1":{"name":"parted","description":"A streaming body parser","author":{"name":"Christopher Jeffrey"},"version":"0.1.1","main":"./index.js","repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"keywords":["multipart","parser","http","express","middleware"],"tags":["multipart","parser","http","express","middleware"],"readme":"# parted\n\nParted is a streaming multipart, json, and urlencoded parser for node.js,\nwritten from scratch. It comes bundled with an express middleware which\nwill use the necessary parser depending on the request mime type. Each parser\nis also lazily loaded, so there is no unnecessary memory usage if you only need\none of them.\n\nThe middleware will leave you with a `req.body` object, similar to the default\nbody parser included in express. If a file was included with a multipart\nrequest, a temporary path to the uploaded file is provided in `req.body`.\nThe multipart parser will also create a `req.files` object specifically for\nfiles if you prefer.\n\nEvery parser handles nested fields in the same way `node-querystring` does.\n\n*Note;* Although the JSON and qs/encoded parsers are streaming, they're disabled\nby default and buffering parsers are used instead. Use the `stream` option to\nenable them.\n\n## Install\n\n``` bash\n$ npm install parted\n```\n\n## As a middleware\n\n``` js\nvar parted = require('parted');\n\napp.use(parted({\n  // custom file path\n  path: __dirname + '/uploads',\n  // memory usage limit per request\n  limit: 30 * 1024,\n  // disk usage limit per request\n  diskLimit: 30 * 1024 * 1024,\n  // enable streaming for json/qs\n  stream: true\n}));\n```\n\nWhen `multiple` is disabled only a single part will be present\nfor a given name, for example:\n\n```js\n{ image: '/tmp/bigred.1319577761529.png' }\n```\n\nHowever when `multiple` is enabled, this _may_ be an array:\n\n```js\n{ images:\n   [ '/tmp/bigred-pau.1319577761529.png',\n     '/tmp/bigred-ico.1319577761528.png',\n     '/tmp/bigred-rec.1319577761529.png',\n     '/tmp/bigred-sto.1319577761529.png',\n     '/tmp/bigred.1319577761529.png' ] }\n```\n\n## Usage\n\n### The multipart parser alone\n\n``` js\nvar multipart = require('parted').multipart;\n\nvar options = {\n  limit: 30 * 1024,\n  diskLimit: 30 * 1024 * 1024\n};\n\nvar parser = new multipart(type, options)\n  , parts = {};\n\nparser.on('error', function(err) {\n  req.destroy();\n  next(err);\n});\n\nparser.on('part', function(field, part) {\n  // temporary path or string\n  parts[field] = part;\n});\n\nparser.on('data', function() {\n  console.log('%d bytes written.', this.written);\n});\n\nparser.on('end', function() {\n  console.log(parts);\n});\n\nreq.pipe(parser);\n```\n\n## Running tests\n\n    $ node test\n\n","readmeFilename":"README.md","_id":"parted@0.1.1","dist":{"shasum":"765a6199a5932384659a0206f8ef4f8e6842cf6d","tarball":"https://registry.npmjs.org/parted/-/parted-0.1.1.tgz","integrity":"sha512-s9vZdpX+28+hAqQ6HpXayywGfUQ8fQe/d10otl6u8ubltMJkuscEAcOd7pkZKzYHOzuCsWtH869cI4YsGmOClQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCanmIFLwDFn7Jovjx4o70P8x9IWUgO/R7qvsZBnEpMbgIgMVvmkYB3EOT9fgy0g/7jZ8DOEnS2vzLcpI8WI5JLwgQ="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}]}},"maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"time":{"modified":"2022-06-23T11:39:56.229Z","created":"2011-08-29T19:11:23.029Z","0.0.1":"2011-12-08T18:15:47.933Z","0.0.2":"2011-12-08T18:15:47.933Z","0.0.3":"2011-12-08T18:15:47.933Z","0.0.4":"2011-12-08T18:15:47.933Z","0.0.5":"2011-12-08T18:15:47.933Z","0.0.6":"2011-12-08T18:15:47.933Z","0.0.7":"2011-10-29T08:21:14.603Z","0.0.8":"2011-11-10T21:16:06.015Z","0.0.9":"2011-12-08T18:15:47.933Z","0.1.0":"2012-01-30T20:49:25.184Z","0.1.1":"2013-02-10T01:42:04.765Z"},"author":{"name":"Christopher Jeffrey"},"repository":{"type":"git","url":"git://github.com/chjj/parted.git"},"users":{"nathan":true,"quocnguyen":true}}