{"name":"it-multipart","version":"3.0.0","description":"Async iterable http multipart message parser","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/achingbrain/it/tree/master/packages/it-multipart#readme","repository":{"type":"git","url":"git+https://github.com/achingbrain/it.git"},"bugs":{"url":"https://github.com/achingbrain/it/issues"},"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"build":"aegir build","lint":"aegir lint","dep-check":"aegir dep-check","clean":"aegir clean","test":"aegir test -t node","test:node":"aegir test -t node --cov","release":"aegir release"},"dependencies":{"formidable":"^2.0.1","it-pushable":"^3.1.0"},"devDependencies":{"@types/formidable":"^2.0.5","aegir":"^37.5.0","form-data":"^4.0.0","it-drain":"^2.0.0","node-fetch":"^3.2.10","uint8arrays":"^4.0.2"},"browser":{"http":false,"formidable":false},"gitHead":"0b648163d4aec76ec7cf388e407c06c39038704a","_id":"it-multipart@3.0.0","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-toThtH3xxAaF4A89k1FX08ZA2whK6x8/7Tgz0JvSGV5b8bR5KaR2wx6oq7E7sqa1Q05hGNGy3pbKQM/59IoeXQ==","shasum":"152391b323e4fdf7ecc183eb8f818b060e880af7","tarball":"http://registry-npm.ywwl.com/it-multipart/download/it-multipart-3.0.0.tgz","fileCount":8,"unpackedSize":9346,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa1XPEZlmETQ5HhzcKiybyBiDHzQGL6sxanreGknFAIAIhAPqg0tokEx6ny0FIHzLYtG2QscY7+ObL68lq9GUt7jRQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTRlGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjnA//bonTW28xPGJsS9mCkdcvFJ2J6i5ey8ZCCf0LXZ40ZER1ImdS\r\noaiTKxpZDvluMkADGP9uIs7dv++Jkka8R02/7NO8lqWWroX83B0+/q3UUsb4\r\n6TEIV7ZCnPuqOmxbKD3cXnGUBO/go3yrkv4iIqndObrzBAmC5EjFK4Z6WJTy\r\nMFUQCUd+C+wekwDcBG6PhT8pdFF5AwlAmziIMcbBdc7k5N4zbcnbEIFCjDp3\r\n18R0lq7c33I1ii5+B6M6RNFTckTlT6pC6MYCr4bieCgmDe3WTvrtBUhb2Zlq\r\nEU8a5pdjVs/nxF5/oqFb1vHPhoW8qXjvFiODINDTMCTOF0BUGkDUFezFPzQ+\r\nupz2ZBvfOfJNC7Zed1IfzNQSncl9MSuT1VwxHDfLvA4saUHs9x0bSSa/T/R9\r\nwcd89DpI9cz9InbU9qIkMohE6FFUmBDKpDOAMF+m+T7vqlgq85g4SJ41Y/fi\r\nYXhtr3lQEsoGP5Ep8zOhS8Q0R9+vUVp2JQviQiFjv3biNZZcTkV7OWtiMD9j\r\nRuz/e5bw94OLK+aJYtAo/L0YuVJv48Ixr3V5GMQrCoSe/6BM2dHgj5q5E2Jf\r\noenq2D8RVJw7ELuCDHEb/fi/F4on3Okf9DERyHYxVK14ymJBF9LlLlO35rIP\r\nPFpbhsCI7+1D2rwXQltpuR7U2xwwTMzP2Oc=\r\n=wPvN\r\n-----END PGP SIGNATURE-----\r\n","size":3202,"noattachment":false,"key":"/it-multipart/-/it-multipart-3.0.0.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-multipart_3.0.0_1665997125807_0.12217470369101813"},"_hasShrinkwrap":false,"readme":"# it-multipart\n\n[![codecov](https://img.shields.io/codecov/c/github/achingbrain/it.svg?style=flat-square)](https://codecov.io/gh/achingbrain/it)\n[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/it/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/achingbrain/it/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Async iterable http multipart message parser\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nAllows iterating over multipart messages found in a HTTP request/\n\n## Example\n\n```javascript\nimport http from 'http'\nimport multipart from 'it-multipart'\n\nhttp.createServer(async (req, res) => {\n  if (req.method === 'POST' && req.headers['content-type']) {\n    for await (const part of multipart(req)) {\n      console.log(`part with HTTP headers ${part.headers}`)\n\n      // nb. part.body must be consumed before the next part is emitted\n      for await (const chunk of part.body) {\n        console.log(`part with content ${part.name} contents:`, chunk.toString())\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# Install\n\n```console\n$ npm i it-multipart\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/it/modules/it_multipart.html>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/it/blob/main/packages/it-multipart/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-multipart/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1665997125979,"_cnpm_publish_time":1665997125979,"dist-tags":{"latest":"4.0.0"}}