{"_id":"@blubox/body-parser","_rev":"7-ff1054035c7cabb1161fbbbe62003929","name":"@blubox/body-parser","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"@blubox/body-parser","version":"0.0.1","description":"Body Parser for Blubox","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/body-parser","license":"MIT","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.8.2","@types/xml2js":"^0.4.12","terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.0.1"},"dependencies":{"xml2js":"^0.6.2"},"_id":"@blubox/body-parser@0.0.1","gitHead":"84bf9e27a1deb44ddbd8a5b44b1966bd863c6989","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-AUxeqGkN5E3cREVZQafWt1G5hfWlR93yoa8aXdkbT3jZJCNNkFbiw3606ypvdC3xBrkqjLqxBRRTODLiZaMeZA==","shasum":"e65cb42096a25c78129fe71c79d187eaec2d940b","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-0.0.1.tgz","fileCount":6,"unpackedSize":10878,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGr7u2Or/AtqE7WhSTk3KAtVK5AtGsJIlndrMFJjBhzzAiEAhPbqkk2v7iURd5ROf6HAEe4S6e8wRMSLZUpo9lt/0i8="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_0.0.1_1696624103506_0.4243568251894416"},"_hasShrinkwrap":false},"0.0.2":{"name":"@blubox/body-parser","version":"0.0.2","description":"Body Parser for Blubox","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/body-parser","license":"MIT","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.8.2","@types/xml2js":"^0.4.12","terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.1.0"},"dependencies":{"xml2js":"^0.6.2"},"_id":"@blubox/body-parser@0.0.2","gitHead":"f53ad493f47a033ef0c0b9c9fb0aace5275c4d30","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-7XELs/wFcvtM+r8VPTh4XpJnE+eRPVjBF7sLYwe9Bx5si6q9ZjeB88zqbLuZio6IKXDcUuQ8sR0p3gjYcT80zg==","shasum":"df11f60206fd2670656974b3f01a2811b5f46b23","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-0.0.2.tgz","fileCount":6,"unpackedSize":11096,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGfdbilL2re5oZxa8o2XCeIibAJ8gCaplEuWa3QXP7KwAiEAg0bqGYck60NGl+wJ5JIhLa3rMI+4AgVvAd6cnYdc71k="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_0.0.2_1697504746571_0.13368808393257514"},"_hasShrinkwrap":false},"0.0.3":{"name":"@blubox/body-parser","version":"0.0.3","description":"Body Parser for Blubox","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/body-parser","license":"MIT","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.8.2","@types/xml2js":"^0.4.12","terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.1.0"},"dependencies":{"xml2js":"^0.6.2"},"_id":"@blubox/body-parser@0.0.3","gitHead":"059535a6880dc1f66c6cab550ef062477ff2e82f","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-TOMZskFWTE2Vb+Igsj5tLRPRbptXsXqIW1yY9AoVilDrdEq1wXk1b2skpqaXoMgG110AaHOtJDCdstBB8PwpRg==","shasum":"b04e1254c9bcccc453e74198d13856f7fe45fb7f","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-0.0.3.tgz","fileCount":6,"unpackedSize":9239,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDauHbneppspFZhGWHJv94+ubjgQVTAiAItD7KohonAFgIhAOOVtjdmhVdm+cZ0GtghwgIc4c68JzGkkQ+elhM+ifNE"}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_0.0.3_1697593237484_0.644135945835578"},"_hasShrinkwrap":false},"0.0.4":{"name":"@blubox/body-parser","version":"0.0.4","description":"Body Parser for Blubox","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/body-parser","license":"MIT","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.8.2","@types/xml2js":"^0.4.12","terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.2.0"},"dependencies":{"xml2js":"^0.6.2"},"_id":"@blubox/body-parser@0.0.4","gitHead":"62a948f3a3f7657964287bbf20c3596b38d68d32","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-iS7pNWT9g9Zd+a2s5YviMSHfg7vCCI2JcnwY/b+Pll1paE6voLUXt8RcLgX91+S8t2CMlLklS+NzyGndLzdlfg==","shasum":"47dc8eb6cf6f16e6d3a6aade19b52cae6ccb322e","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-0.0.4.tgz","fileCount":6,"unpackedSize":9050,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDj054DjhdCSF/SZtt7Iy6XeqPt+eK+rFLUM1h1hKPymQIgN+9OuFaaIsfUH2XsK0yHSi3t39nWQMdRnMcmQWQO8WE="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_0.0.4_1698264898760_0.5156410582650235"},"_hasShrinkwrap":false},"0.0.5":{"name":"@blubox/body-parser","version":"0.0.5","description":"Body Parser for Blubox","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/body-parser","license":"MIT","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.8.2","@types/xml2js":"^0.4.12","terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.2.0"},"dependencies":{"xml2js":"^0.6.2"},"_id":"@blubox/body-parser@0.0.5","gitHead":"84d558115d2665f7a4a6a78316518461fe34a254","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-VTPGD9y3buXtC+rF753oEPCpbmf2oNTk2Zft7u7Uz+uwTXvdSnhaVZWYn28sAGs0auspk9PgOOjyvhpF2qL9Nw==","shasum":"8a42e563b0d3e7d165e4275adeb26bf54e9bdf8e","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-0.0.5.tgz","fileCount":6,"unpackedSize":9082,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQqqxB7lP0+Km4EKBn7pAh5wDBH7AdeY+CJWyK5zAYjwIhAP+B6vapdjOuongM1hwOyXzikFjP4y3JI7PwFyeWRY/p"}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_0.0.5_1698275894334_0.7338651383810677"},"_hasShrinkwrap":false},"0.0.6":{"name":"@blubox/body-parser","version":"0.0.6","description":"Body Parser for Blubox","main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"private":false,"publishConfig":{"access":"public"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"homepage":"https://github.com/gnzcode/blubox/tree/main/docs/body-parser","license":"MIT","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.8.2","@types/xml2js":"^0.4.12","terser":"^5.21.0","tsup":"^7.2.0","typescript":"^5.2.2"},"peerDependencies":{"blubox":">=0.2.0"},"dependencies":{"xml2js":"^0.6.2"},"_id":"@blubox/body-parser@0.0.6","gitHead":"84d558115d2665f7a4a6a78316518461fe34a254","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-4/cFP6Vnd4BXwupdkLJOCHCnfm/dT524V85+gJKJgE4JY5w6vaq/a31qf8YOKqWBsrXJLKjqLVLHgPqu/hZLtg==","shasum":"bf7993f0c2253bfb7213ade1d29e9283510d1deb","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-0.0.6.tgz","fileCount":6,"unpackedSize":9288,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0Hq6rdOF4lEKE+znIY0JuII6zv3TT5JnRi7Oeh1PqzAiBQBSxzJKpoxzutLqmvCBEbZ7CbV1cQpBJwlyJthfUEkA=="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_0.0.6_1698351347315_0.532347893361"},"_hasShrinkwrap":false},"1.0.0":{"name":"@blubox/body-parser","version":"1.0.0","description":"Body Parser for Blubox","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"license":"MIT","homepage":"https://bluboxs.com/","private":false,"publishConfig":{"access":"public"},"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"peerDependencies":{"blubox":">=1.0.1"},"devDependencies":{"@types/formidable":"^3.4.5","@types/xml2js":"^0.4.14","xml2js":"^0.6.2"},"dependencies":{"formidable":"3.5.1"},"_id":"@blubox/body-parser@1.0.0","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-4A0syBeBvPS5a6R2wj+1RoBDYAIXxXNPU0WbWgx4ZdoyZrDdpiqL6oRgtXXyCFzwBBd4FZRWvU1YPuJ4XlZa1Q==","shasum":"a79391cec1288773f20ae8377ffd6a48766cba17","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-1.0.0.tgz","fileCount":6,"unpackedSize":212496,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJEC0q1CDYJzWFdhgKg9lJjkI6MYqBYds6ZOVFU9+3AwIhANeaEaDwuGIFl5t8sYF0WVITjTmbuzeEZs8p4I1IUR4s"}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_1.0.0_1702238220596_0.7477847676988056"},"_hasShrinkwrap":false},"1.0.1":{"name":"@blubox/body-parser","version":"1.0.1","description":"Body Parser for Blubox","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"main":"./dist/index.js","module":"./dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"license":"MIT","homepage":"https://bluboxs.com/","private":false,"publishConfig":{"access":"public"},"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --minify terser","prepublishOnly":"npm run build"},"peerDependencies":{"blubox":">=1.0.1"},"devDependencies":{"@types/formidable":"^3.4.5","@types/xml2js":"^0.4.14","xml2js":"^0.6.2"},"dependencies":{"formidable":"3.5.1"},"_id":"@blubox/body-parser@1.0.1","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-uV10VPaHmNNWRePn7cY1jQT/J/dSrz943nceygrwZuyu95yZdrrGjVDqt0PISJ5k2ULb2ZNt3b8BL/ojRw7quw==","shasum":"9c815aed3f594258e74f555d0c482b38e92c630b","tarball":"https://registry.npmjs.org/@blubox/body-parser/-/body-parser-1.0.1.tgz","fileCount":6,"unpackedSize":208742,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDctHKnbGfxdXvDZeY1+Kk740L2izmDdN5M2beoSFvciQIgULXJ4vTLMWmQ9WV+J8ZiIYRUuKcE1mRj3XRRzIx8458="}]},"_npmUser":{"name":"gnzcode","email":"gnzcode@gmail.com"},"directories":{},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/body-parser_1.0.1_1702401650191_0.911341616998069"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-06T20:28:23.440Z","0.0.1":"2023-10-06T20:28:23.753Z","modified":"2023-12-12T17:20:50.558Z","0.0.2":"2023-10-17T01:05:46.863Z","0.0.3":"2023-10-18T01:40:37.712Z","0.0.4":"2023-10-25T20:14:59.127Z","0.0.5":"2023-10-25T23:18:14.518Z","0.0.6":"2023-10-26T20:15:47.594Z","1.0.0":"2023-12-10T19:57:00.803Z","1.0.1":"2023-12-12T17:20:50.380Z"},"maintainers":[{"name":"gnzcode","email":"gnzcode@gmail.com"}],"description":"Body Parser for Blubox","homepage":"https://bluboxs.com/","keywords":["body-parser","blubox-body-parser","blubox","@blubox/body-parser"],"repository":{"type":"git","url":"git+https://github.com/gnzcode/blubox.git"},"author":{"name":"Gnzcode","email":"contact@gnzcode.com"},"bugs":{"url":"https://github.com/gnzcode/blubox/issues"},"license":"MIT","readme":"# Body Parser Middleware\r\n\r\n> A middleware for parsing request bodies in various formats, including JSON, raw data, urlencoded, and XML.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @blubox/body-parser\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nconst bodyParser, { BodyParserOptions } = require('@blubox/body-parser')\r\n\r\nconst jsonParser = bodyParser.json()\r\nconst rawParser = bodyParser.raw()\r\nconst urlencodedParser = bodyParser.urlencoded()\r\nconst xmlParser = bodyParser.xml()\r\n\r\n// Use the middleware in your application\r\n\r\ncontroller.use(jsonParser)\r\ncontroller.use(rawParser)\r\ncontroller.use(urlencodedParser)\r\ncontroller.use(xmlParser)\r\n```\r\n\r\n## Options\r\n\r\n- limit (optional): Set a limit on the request body size. Default is unlimited. Example: { limit: '1mb' }\r\n- requiredHeaders (optional): Array of headers that must be present in the request. Example: { requiredHeaders: ['Content-Type'] }\r\n- disallowedHeaders (optional): Array of headers that must not be present in the request. Example: { disallowedHeaders: ['Authorization'] }\r\n- strictMode (optional): Enable strict mode to enforce all specified options. Default is false. Example: { strictMode: true }\r\n\r\n## Size Units\r\n\r\nSize limits can be specified using units such as 'kb', 'mb', 'gb', or 'tb'. Example: '1mb', '100kb'.\r\n\r\n## Middleware Methods\r\n\r\n`json(opts?: BodyParserOptions)`\r\n\r\nParses the request body as JSON.\r\n\r\n`raw(opts?: BodyParserOptions)`\r\n\r\nRetrieves the raw request body.\r\n\r\n`urlencoded(opts?: BodyParserOptions)`\r\n\r\nParses the request body as urlencoded data.\r\n\r\n`xml(opts?: BodyParserOptions)`\r\n\r\nParses the request body as XML.\r\n\r\n## License\r\n\r\n[MIT](https://github.com/gnzcode/blubox/blob/main/LICENSE.md)\r\n","readmeFilename":"README.md"}