{"bugs":{"url":"https://github.com/ipfs/js-ipfs/issues"},"dist":{"shasum":"25eb27932d35e54331cab453aa66b14f08569523","tarball":"https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.3.1-rc.145.tgz","fileCount":6,"integrity":"sha512-uy5jwOgqXxq0BBFy9UBNbbLM6bM+4PH3BSGz3/NLZkyc33mpWdT0s3gGrXeuEbzv4SusGQgjb2D54Y8nfmno9Q==","signatures":[{"sig":"MEYCIQCXgq+JfGMhUaKLws7u0BqCppTwEooAJivwt2b7GBIoCAIhAJRwOOebteVjecTM7rAGbM36Xbzk9qlgtCl++00Gohox","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\nwsFcBAEBCAAQBQJeXqp2CRA9TVsSAnZWagAAVhcP/1A+yoiR1H+FPruTk76a\nZZKCRlg6k9KyISYqA1K/Tm8V4GML5KbRy8nnkye1mFFhlsy69EDYfd2Eil7T\nHTxz58oYQqHWzKXK642GWCnzB76J0WFXf7NxSY+smaEd3Nyh7okqC5/4C9+N\nF6pu8eR/RVLT29mgtbPjgcmo2fPQGJ3bZAW/vtj+HaPBzZoJ+vYHEH4/zNoH\nur3rgyEbYmeC2YH2LHohTmpOVaR/huRrThvuENEvQ3KL++nYVeiBHD36tQhR\nf7JGy2QRVbOvV9lJ+rISsLBjQC8ObqzrCxOrtCbAWNOybuFUVW4F4y3P2qq9\nCpAbtngIMFdhURcXJsERjV5hPegcXfDiEfT6lo1R6NxDvb07cxMhajmHvkFY\nJxTpaEbbLxg0k2A9073YFbG+smvXwsyU+S3HDgez8uhNPFFu3guRyF+/Da/J\nLbE46NKMRMzpVEFSaHGUFycdVHpHC6qAbksWtRFUltFk6TZMz3HrcNysVSjc\nUfOC0qHRWvVCxUTdSLAhR/FBtUlsW7Ue4GEU3EsJ32jVUnMVhLvCVzqkRsh/\nrRE+Xz2DPWnx7VxNvW4tWYR7GoFjp2QQRq7N3tR6Febu+Z4kx9WU5tUABo1D\n4jM2aCe49N4ua3yVPdsjksUBu1kEqAMiheDmHyJj090yLBWhWSWxLxUa9DDL\nihPd\r\n=7NeV\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":"e9eca18b9531f35b19094f9c0aa5073fba07814d","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.145+e9eca18"},"_npmOperationalInternal":{"tmp":"tmp/ipfs-multipart_0.3.1-rc.145_1583262326285_0.09950214515731881","host":"s3://npm-registry-packages"},"_id":"ipfs-multipart@0.3.1-rc.145","version":"0.3.1-rc.145"}