{"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"dist":{"shasum":"87e4410a985d226e929da7bdf3de1e8f3a9e4515","tarball":"https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.3.1-rc.115.tgz","fileCount":6,"integrity":"sha512-ShU7MOVDV8t9MdUEBug3SnXxnIbg1mYFomBOudC+TicgH8GyTulVbyTYPcVcgxQvI4rtdTSKUYlsbWhyhxRbnQ==","signatures":[{"sig":"MEUCIDZMUUZpZBnYhzTjSblxp0g1bedN94gy8F2TKgZs5O34AiEAq2exRdfP7+hVHiPnfoY/qaqApglHmrndMrmZRloVXHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYfoZCRA9TVsSAnZWagAAfscP/0tjrYGzgr60Yt1x81+B\n+snVC2Of6KShN+mdyEY8twNipypxZ6fbk2PY/hQUzoKL7QJpN4PqCmNuhUI+\nhn+xDuOxBQ4/yk2gVMiBESAQ+DsHvdCsQYKEttMJzkSgQT7+xpZEoatA6wvC\nSwQKfGLIhUJvKXMHezuibq2WtIgGP4mTNlF//a+VFWKjYV2FsROiV2XLXzJr\nmPC4s0UCFciD5oMQOQCZS+5U499vbqYs7hYCPpnMT4CWNhJDvx+dQd5/Sqam\nmLXz61ib7n/qFTecd1VxPaRhjmDyYgHr9E3QymgYiO9QHhdsldELs+cMjdq8\n45/62Kc8/a4k61g1HEwOuj+monwhl+bXFy/tX/7qIOkk1+DFZqbGcEkQMIUI\n9Z4XyqiZEotbYrMYCOPV9WLMNqzbG28p9RV7uaRe8nhfxRGoG9Db/MkQMD6o\nO7kJZauDjH9tRJJxGpTHYzkO5QCLnOxpys65n9hwfl3brICNOgxSzwD1O+0w\nhZYXHzxK9w6nN5+4AXA8otPzZVssasnZWfcHMD/njT3hofGHsUYJYGV2ROai\ncDWl0RE5b4sqfx6kOkwcKFP2v8J4azdTHZ5hdztt3ZKx3+tfhx0lI0WDH2Hp\nb9WmJ6ENrFIiMJg8SlFCl2M5B07gNZHfQYEeAs2ell9nD1zW/CD16zygaWTX\nEYBX\r\n=uPYj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","name":"ipfs-multipart","readme":"ipfs-multipart\n====\n\n[![made by Protocol Labs](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\n[![Project IPFS](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)\n[![freenode #ipfs](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Codecov branch](https://img.shields.io/codecov/c/github/ipfs/js-ipfs-multipart/master.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs-multipart)\n[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs-multipart)](https://travis-ci.com/ipfs/js-ipfs-multipart)\n[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-multipart.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-multipart)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\n\n\n> A set of utilities to help dealing with [IPFS](https://ipfs.io/) multipart.\n\n## Lead Maintainer\n\n[Hugo Dias](https://github.com/hugomrdias)\n\n### Notice \n> This module is moving to async iterators starting from 0.2.0.   \n> The last minor version to support event emitter is 0.1.1, any backports will merged to the branch `event-emitter` and released under  `>0.1.0 <0.2.0`.\n\n## Install\n```\nnpm install ipfs-multipart\n```\n\n## Usage\n```javascript\nconst http = require('http')\nconst parser = require('ipfs-multipart')\n\nhttp.createServer(async (req, res) => {\n  if (req.method === 'POST' && req.headers['content-type']) {\n\n    for await (const entry of parser(req)) {\n      if (entry.type === 'directory') {\n        console.log(`dir ${entry.name} start`)\n      }\n\n      if (entry.type === 'file') {\n        console.log(`file ${entry.name} start`)\n\n        for await (const data of entry.content) {\n          console.log(`file ${entry.name} contents:`, data.toString())\n        }\n\n        console.log(`file ${entry.name} end`)\n      }\n    }\n\n    console.log('finished parsing')\n    res.writeHead(200)\n    res.end()\n  }\n\n  res.writeHead(404)\n  res.end()\n}).listen(5001, () => {\n  console.log('server listening on port 5001')\n})\n```\n\n## Contribute\n\nSee [the contribute file](https://github.com/ipfs/community/blob/master/contributing.md) and our [code of conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md)!\n\nPRs accepted.\n\nSmall note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT](LICENSE) © Protocol Labs Inc.","engines":{"npm":">=6.0.0","node":">=10.0.0"},"gitHead":"f381c34545e5550e051b98e602c50f296e35c03e","license":"MIT","scripts":{"lint":"aegir lint","test":"aegir test -t node","build":"aegir build","clean":"rm -rf ./dist","dep-check":"aegir dep-check"},"_npmUser":{"name":"ipfsbot","email":"infra-accounts@protocol.ai"},"homepage":"https://github.com/ipfs/js-ipfs","keywords":["ipfs","multipart","files"],"repository":{"url":"git+https://github.com/ipfs/js-ipfs.git","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.19.0+x64 (linux)","description":"A set of utilities to help dealing with IPFS multipart.","directories":{},"maintainers":[{"name":"xicombd","email":"xicombd@gmail.com"}],"_nodeVersion":"10.19.0","contributors":[{"name":"Alan Shaw","email":"alan.shaw@protocol.ai"},{"name":"Alex Potsides","email":"alex@achingbrain.net"},{"name":"Francisco Baio Dias","email":"xicombd@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hugo Dias","email":"mail@hugodias.me"},{"name":"Maciej Krüger","email":"mkg20001@gmail.com"},{"name":"dependabot-preview[bot]","email":"27856297+dependabot-preview[bot]@users.noreply.github.com"}],"dependencies":{"it-multipart":"^1.0.1","@hapi/content":"^4.1.0"},"_hasShrinkwrap":false,"leadMaintainer":"Hugo Dias <mail@hugodias.me>","readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","aegir":"^21.3.0","request":"^2.88.0","it-drain":"^1.0.0","ipfs-http-client":"^42.0.1-rc.115+f381c34"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-multipart_0.3.1-rc.115_1583479320899_0.48573789359089337","host":"s3://npm-registry-packages"},"_id":"ipfs-multipart@0.3.1-rc.115","version":"0.3.1-rc.115"}