{"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"dist":{"shasum":"b3ee4d24353376674cc517006be63eac9f6e95bb","tarball":"https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.3.1-rc.49.tgz","fileCount":6,"integrity":"sha512-Hci0d7cs9IjcZXB2eult/P78Ra+o7d/CIyKKq6de3Ww96q73QDzkA8skdcwZ0in9rfjuYn17+ap6+vdRIZMdmw==","signatures":[{"sig":"MEYCIQCqmT3XQcTERcSAPlPop9UHG3rbjKpVH9aLfaOeLxRPzQIhAJLWhc8iyWHHwNhw6TUuBMJCEAPgPBQ1BeQaw0BmNa1I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea+U7CRA9TVsSAnZWagAAqTUQAIQM8GSL78t+anOUs0y0\nM8beAVD8m1sj0CIXJqonOFMytqqil8anmjpgHRSeAuWIG1nmBnrGtp/Kf831\nIWMi1CpG3UDEdLtH0Bo9WDVXL6kQT6UYo8jTyyi5gx8SsCSj7CKQ4gpuagBs\nLQe+VUlRD/m6TRwh2Xpet8fqRWSrK6EICg6P6xL0W1E7BGVGPBEoKKK7U+Re\nqYyJB+g7EpixPoQFSM6CFAXIhDRYUkXTs5o8yONUg1BMBGgBvbOWBtqoCpjh\nr+Kqggg8gFREDONHejvjB/HsCrUz4BLA8G6puD3QQKbqCIMGluWe/ASQjvQ+\nf1f9NqvfDugBkXbQE5Ok3jzd6UttAijE5lNX5Y0i4ILfPpSL7e89otoZ/JuX\nm9mSX1sTnq4lJZKFMkmAd+7HGDmYvPU2BLvNw/AjhuHjCmAkWwxQMS6Kn3KQ\nd9PbIZhU2kiWJNotQUV0bJ28IuIkPMaS3bZoqhhLiTH5zbDPnjsISHDer+zW\nkoP540NxyaWyCwOiyb2OC60MxurQe86ezCZqJwe8wLaAXKPjx57N7KOh6WyU\nCvWrM1pG/XcX0jBn/cpM2lxknroy+CVo/VpSemWcQSzdOakvWGXsQX91yxMd\nCCibCYpvauned0gSYd22d3FKV1pYr74hItycGZq2OuYQgREhYBite4Ky6gTD\n8JY7\r\n=+mS+\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_JS.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.\n","engines":{"npm":">=6.0.0","node":">=10.0.0"},"gitHead":"bfba76748b8aabc0d66768009ff6f4adb24ff439","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.49+bfba767"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-multipart_0.3.1-rc.49_1584129339424_0.7425917832210873","host":"s3://npm-registry-packages"},"_id":"ipfs-multipart@0.3.1-rc.49","version":"0.3.1-rc.49"}