{"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"dist":{"shasum":"d4c889f3eafd64894686cc9dfb6cbc324b767edb","tarball":"https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.3.1-rc.74.tgz","fileCount":6,"integrity":"sha512-5MzOmFU2hltIVAREBVJLgMFeQgr2esdjlSKAnLy5GS3xJ/TKMGXVHdpbnmet9AAv1sPua40IBz4/Ktvb6/EhWQ==","signatures":[{"sig":"MEQCIDDjrlreg2lYcpwHknnJqjt6u2r4GLVK7QJk4qoktJ8yAiAhTxfhOvTznZNMDM65oMgYS+wyh/UNRilurO73Of6hQQ==","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\nwsFcBAEBCAAQBQJeZk78CRA9TVsSAnZWagAA294P/AnN8zMgqV5PX9Wb82Ri\nKSJkDZ76x40k+/VUVF/8+KkVsaXa9JnjPt7woA6iFy7kZAOQt12I5d2nVmmK\nXdL0lTKPfimT5yhf0QuBgAKsdRYZ0HRPIKRNGyzdP0WnXW/OSk4M6LuuJ51S\nqqjaxtEUfHRDzDYzEY3cWXXdE244RX9nxiAzMW5zbOuEgbzLepDDIlD1eS0Q\niMgHPIqgVWuJ7QX7DW/KBb3olGbDzowjZRdeWHWtqI8FdM+FmDG3E1NdGQAA\nCvyi7KlaMLk1kWIhWG7ZWcipHL7reIuASzkImpBiPZbZSlUO4AML4inY/ogX\nSgsVvhYzvz3wbhLX2JlygnRYn/R/HiFsVxdIXpQsuNcrP9VQGG1IFeMCNw7q\nlq20HYZ8fdEbHbebAC0Vkzf8uOzKLBDXWZGmI/oE/jZtFmTM4QUPN21c+YfF\nQV3HBV+W779cY/Hm0VD6B15J37L4vpBGo57XTntPNlg5GlL8ZYB/uJBlHbfV\nE4Iq7QVjOZmzr5JW06Ad0UuD7IA7Qeatg8O+nRcYZ4YR9PAwHwvvTUEnRua6\nfovBBQlRrIqs/KKMD5gfWPnUQPHCXFfJ/82Ynwclv8F15/1kEou58eUHV9+2\nPCshmspbG0q4iKJpLcnDPPwZkcMblNJpX5RHrUVeKJIzYCsYpxQSoINUjWgM\nLTXP\r\n=DiPQ\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":"c81c680196f0af82c9dbe7ac1cd404d99e682b1a","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.74+c81c680"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-multipart_0.3.1-rc.74_1583763196374_0.5404580326663249","host":"s3://npm-registry-packages"},"_id":"ipfs-multipart@0.3.1-rc.74","version":"0.3.1-rc.74"}