{"_id":"express-response-middleware","_rev":"9-b870b2af2c112c5208da3168d8812a6a","name":"express-response-middleware","dist-tags":{"latest":"2.3.1"},"versions":{"1.0.0":{"name":"express-response-middleware","version":"1.0.0","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@1.0.0","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"54283546ad48031af1cccce31856984464dd8553","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-1.0.0.tgz","fileCount":14,"integrity":"sha512-fbs3EJHxqkSawM1p/aTcmwgpYx8C4gSHrupuSoS4jfITFX9SJItgJBaXlrXTBq/9/Kxt/WDHrfWHc3KXMqlDaQ==","signatures":[{"sig":"MEUCIQCldyJeREA5rw5eoICi4Bf6sWafk75zbT27wnd8JkPW8QIgBPTg/Wm8GGMp/KQu7VJbb2dE/wrhkHuLmkLdkdl2DQU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32909},"main":"index.js","_from":"file:express-response-middleware-1.0.0.tgz","types":"index.d.ts","scripts":{"test":"mocha","lint:format":"prettier --check index.js index.d.ts package.json","lint:format:fix":"prettier --write index.js index.d.ts package.json"},"_npmUser":{"name":"marklai1998","email":"marklai1998@pm.me"},"_resolved":"/tmp/0281bb6a032bddbfa4145203569b745e/express-response-middleware-1.0.0.tgz","_integrity":"sha512-fbs3EJHxqkSawM1p/aTcmwgpYx8C4gSHrupuSoS4jfITFX9SJItgJBaXlrXTBq/9/Kxt/WDHrfWHc3KXMqlDaQ==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"10.9.2","description":"Transform an express response (or make until no good)","directories":{},"_nodeVersion":"22.14.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","should":"^13.2.3","express":"^4.16.3","bluebird":"^3.5.1","prettier":"3.5.2","supertest":"^3.1.0","@types/node":"22.9.1"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_1.0.0_1740965464766_0.5476537136767934","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"express-response-middleware","version":"2.0.0","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.0.0","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"64777f926f79aff018efc0483b113da3d66efcd2","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.0.0.tgz","fileCount":35,"integrity":"sha512-SRlxLbrzPhsc2bwsogx0z73Tbp0T+Ca+mFUQZ1i/PMZ0FLpIrLowrNkBrkxo6Bgefik3sUIBP4Reb3bS7Pv8/g==","signatures":[{"sig":"MEQCIBtu6f1HH+OrDE3USd4pAwucZRpEnoEzkU7f7ORTfWTSAiAExAdcjEcym5JOnKVHybHrPMD7yacQoAmzs/pAQsIGDg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107588},"main":"dist/cjs/index.cjs","_from":"file:express-response-middleware-2.0.0.tgz","types":"dist/esm/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=18"},"scripts":{"test":"vitest run --coverage","build":"rollup -c","lint:format":"prettier --check src package.json","lint:format:fix":"prettier --write src package.json"},"_npmUser":{"name":"marklai1998","email":"marklai1998@pm.me"},"_resolved":"/tmp/dfbf2604a2a01dc31d5143b0a87f0a43/express-response-middleware-2.0.0.tgz","_integrity":"sha512-SRlxLbrzPhsc2bwsogx0z73Tbp0T+Ca+mFUQZ1i/PMZ0FLpIrLowrNkBrkxo6Bgefik3sUIBP4Reb3bS7Pv8/g==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"10.9.2","description":"Transform an express response","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"4.27.3","vitest":"3.0.7","prettier":"3.5.3","supertest":"7.0.0","typescript":"5.8.2","@types/node":"22.9.1","@types/express":"4.17.21","@types/supertest":"6.0.2","rollup-plugin-dts":"6.1.1","@vitest/coverage-v8":"3.0.7","rollup-plugin-esbuild":"6.2.1","rollup-plugin-peer-deps-external":"2.2.4"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.0.0_1742075409090_0.8505681954040549","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"express-response-middleware","version":"2.0.1","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.0.1","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"05b4284900bb791a678e8ad76194799f082eea42","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.0.1.tgz","fileCount":36,"integrity":"sha512-tQNjn7e3Y3VCbK/oBRIGQU5fdPmZw0KUqxF+ZMnFAWV4kmR9DXXn6U1CoLtMclWoX2OfwKg87lIO8UJHqAtEIw==","signatures":[{"sig":"MEUCIQD62jSk24kVgs2QRcJfjzouAr3zbc0jE9AHycKKov3ZXgIgVXshkMkEfaLSPsn9zfwUK+CJoTlSkr8TEs+5/D3BlNE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107978},"main":"dist/cjs/index.cjs","_from":"file:express-response-middleware-2.0.1.tgz","types":"dist/esm/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=18"},"scripts":{"test":"vitest run --coverage","build":"rollup -c","lint:format":"prettier --check src package.json","lint:format:fix":"prettier --write src package.json"},"_npmUser":{"name":"marklai1998","email":"marklai1998@pm.me"},"_resolved":"/tmp/710cd8f681dcd56564bbdc261e37d8d5/express-response-middleware-2.0.1.tgz","_integrity":"sha512-tQNjn7e3Y3VCbK/oBRIGQU5fdPmZw0KUqxF+ZMnFAWV4kmR9DXXn6U1CoLtMclWoX2OfwKg87lIO8UJHqAtEIw==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"10.9.2","description":"Transform an express response","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"4.27.3","vitest":"3.0.7","prettier":"3.5.3","supertest":"7.0.0","typescript":"5.8.2","@types/node":"22.9.1","@types/express":"4.17.21","@types/supertest":"6.0.2","rollup-plugin-dts":"6.1.1","@vitest/coverage-v8":"3.0.7","rollup-plugin-esbuild":"6.2.1","rollup-plugin-peer-deps-external":"2.2.4"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.0.1_1742075988963_0.9323501397386569","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"express-response-middleware","version":"2.1.0","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.1.0","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"7f059d16156af4e13f82d8e77e800461122ccaec","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.1.0.tgz","fileCount":36,"integrity":"sha512-tiuRo94vrMlyKI81GkJhFgwCHMKz5lnhq5BZIxvA46mssWvxVz5mf55m08psA+EJbDKYcUSZlw/00UiJ6pAl1A==","signatures":[{"sig":"MEUCIGvBo5EKieAz/33ickkwtc1SnxEHrkSZNlHkLx9S87FnAiEApAKEDJjR4HLGuI6JV89kax+msOfiJfbqsDDqQifWSRU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108764},"main":"dist/cjs/index.cjs","type":"module","_from":"file:express-response-middleware-2.1.0.tgz","types":"dist/esm/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.mjs"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}}},"scripts":{"test":"vitest run --coverage","build":"rollup -c","lint:format":"prettier --check src package.json","lint:format:fix":"prettier --write src package.json"},"_npmUser":{"name":"marklai1998","email":"marklai1998@pm.me"},"_resolved":"/tmp/a2f4260fa2d431f7c779daf3657e7ba3/express-response-middleware-2.1.0.tgz","_integrity":"sha512-tiuRo94vrMlyKI81GkJhFgwCHMKz5lnhq5BZIxvA46mssWvxVz5mf55m08psA+EJbDKYcUSZlw/00UiJ6pAl1A==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"10.9.2","description":"Transform an express response","directories":{},"_nodeVersion":"22.14.0","typesVersions":{"*":{"*":["./dist/esm/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"rollup":"4.35.0","vitest":"3.0.8","prettier":"3.5.3","supertest":"7.0.0","typescript":"5.8.2","@types/node":"22.13.10","@types/express":"5.0.0","@types/supertest":"6.0.2","rollup-plugin-dts":"6.1.1","@vitest/coverage-v8":"3.0.8","rollup-plugin-esbuild":"6.2.1","rollup-plugin-peer-deps-external":"2.2.4"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.1.0_1742078795641_0.2969702303264037","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"express-response-middleware","version":"2.1.2","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.1.2","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"f6de7e31ac2d5b5059614de37c7b1314b5ffe2a7","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.1.2.tgz","fileCount":40,"integrity":"sha512-kbmE0V4CZsuUXZ+Vqdtj6bgbwltCYvecyp3DTMNXxQQ90wREoxP/4M1hhJXzeZe+3rKD2+BnDsFszDTWEYu07A==","signatures":[{"sig":"MEYCIQCgLw+H6fgWhuR84PcohIJxa3sWShWS/yElfnA3CXKcQQIhAP0oMgahB1QWCOJSv/s4xMwrAyEIBVvUeG+P41W/66dS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116150},"main":"dist/cjs/index.cjs","_from":"file:express-response-middleware-2.1.2.tgz","types":"dist/esm/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.mjs"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}}},"scripts":{"test":"vitest run --coverage","build":"rollup -c","pre-push":"tsc","pre-commit":"pnpm biome check --fix --staged --no-errors-on-unmatched"},"_npmUser":{"name":"marklai1998","email":"marklai1998@pm.me"},"_resolved":"/tmp/eb9dfca4dc3d3273321c383a46dfaa4e/express-response-middleware-2.1.2.tgz","_integrity":"sha512-kbmE0V4CZsuUXZ+Vqdtj6bgbwltCYvecyp3DTMNXxQQ90wREoxP/4M1hhJXzeZe+3rKD2+BnDsFszDTWEYu07A==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"10.9.2","description":"Transform an express response","directories":{},"_nodeVersion":"22.15.0","typesVersions":{"*":{"*":["./dist/esm/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"husky":"9.1.7","rollup":"4.41.1","vitest":"3.1.4","supertest":"7.1.1","typescript":"5.8.3","@types/node":"22.15.21","@biomejs/biome":"1.9.4","@types/express":"5.0.2","@commitlint/cli":"19.8.1","@types/supertest":"6.0.3","rollup-plugin-dts":"6.2.1","@vitest/coverage-v8":"3.1.4","rollup-plugin-esbuild":"6.2.1","rollup-plugin-node-externals":"8.0.0","@commitlint/config-conventional":"19.8.1","rollup-plugin-peer-deps-external":"2.2.4"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.1.2_1748150512059_0.10947281892355987","host":"s3://npm-registry-packages-npm-production"}},"2.1.3":{"name":"express-response-middleware","version":"2.1.3","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.1.3","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"b9e035eac2dcfeb8974325d5f2e90992b05d8468","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.1.3.tgz","fileCount":9,"integrity":"sha512-8+yXg2YgxHNKeoemW6EKwONcrlNgI1tGOKiP+u8sdMrZrdH1SoXupHzJc0AdPPU9EgQfnCLK38pY8ZnmB6jvWg==","signatures":[{"sig":"MEUCIFqk7fm6gcCdG0TgKAtGaCGeE5Z14tzorDg8NFlUcds8AiEA1RIsUlVcQA0C2sJDqbfqaBsrCy7r0L+GCVyyRaHEJUo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49995},"main":"dist/cjs/index.cjs","_from":"file:express-response-middleware-2.1.3.tgz","types":"dist/esm/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.mjs"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}}},"scripts":{"test":"vitest run --coverage","build":"rollup -c"},"_npmUser":{"name":"marklai1998","email":"marklai1998@pm.me"},"_resolved":"/tmp/b16c121e1ec30f5c8606dcd19f2d12ce/express-response-middleware-2.1.3.tgz","_integrity":"sha512-8+yXg2YgxHNKeoemW6EKwONcrlNgI1tGOKiP+u8sdMrZrdH1SoXupHzJc0AdPPU9EgQfnCLK38pY8ZnmB6jvWg==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"10.9.2","description":"Transform an express response","directories":{},"_nodeVersion":"22.15.0","typesVersions":{"*":{"*":["./dist/esm/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"rollup":"4.41.1","vitest":"3.1.4","lefthook":"1.11.13","supertest":"7.1.1","typescript":"5.8.3","@types/node":"22.15.21","@biomejs/biome":"1.9.4","@types/express":"5.0.2","@commitlint/cli":"19.8.1","@types/supertest":"6.0.3","rollup-plugin-dts":"6.2.1","@vitest/coverage-v8":"3.1.4","rollup-plugin-esbuild":"6.2.1","rollup-plugin-node-externals":"8.0.0","@commitlint/config-conventional":"19.8.1","rollup-plugin-peer-deps-external":"2.2.4"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.1.3_1748220953392_0.007560032423608032","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"express-response-middleware","version":"2.2.0","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.2.0","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"ceb7b4c64f4132138f94d8328a62da9d3afd7c84","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.2.0.tgz","fileCount":7,"integrity":"sha512-pLirRwlm+LaBnuhljldg026JLbPilptXIJb3fpJokV5M+oL05uLs13XUrmzsWmlJsB3LzRZxc8emjPq2G1+jlA==","signatures":[{"sig":"MEUCIAQ0ezlk7dLquqIBVPxFtELSwkbMXrCPNex/Zwmo60d4AiEAindG2idbOX0p8XL/jYCMNTRYVVR2sfNcG3JU12UPzZM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/express-response-middleware@2.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21342},"main":"dist/index.js","_from":"file:express-response-middleware-2.2.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"test":"vitest run --coverage","build":"tsdown --format esm --format cjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2e415793-2f38-44e0-8f67-147eb0dbc47b"}},"_resolved":"/tmp/9cab299fa60c1ec23f34fd5e5b1da6ba/express-response-middleware-2.2.0.tgz","_integrity":"sha512-pLirRwlm+LaBnuhljldg026JLbPilptXIJb3fpJokV5M+oL05uLs13XUrmzsWmlJsB3LzRZxc8emjPq2G1+jlA==","repository":{"url":"git+https://github.com/marklai1998/express-response-middleware.git","type":"git"},"_npmVersion":"11.6.1","description":"Transform an express response","directories":{},"_nodeVersion":"24.11.0","typesVersions":{"*":{"*":["./dist/index.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.15.12","vitest":"4.0.6","lefthook":"2.0.2","supertest":"7.1.4","typescript":"5.9.3","@types/node":"24.10.0","@biomejs/biome":"2.3.3","@types/express":"5.0.5","@commitlint/cli":"20.1.0","@types/supertest":"6.0.3","@vitest/coverage-v8":"4.0.6","@commitlint/config-conventional":"20.0.0"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.2.0_1762207478905_0.9092858342627372","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"express-response-middleware","version":"2.3.0","keywords":["mung","middleware","transform","response","express"],"license":"MIT","_id":"express-response-middleware@2.3.0","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"homepage":"https://github.com/marklai1998/express-response-middleware#readme","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"bf5e1801350ac16f5d2effb30d2de414e49c0751","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.3.0.tgz","fileCount":7,"integrity":"sha512-SiLaLb4qAQeil50b25DgbuvihL+c0bgLz4m/G5yE92hDODCRdAwli8Ch+Q2GeaNbmijqQMO6wLuZOBZYkK6VFg==","signatures":[{"sig":"MEUCIEySlTJKX4OyyIme7PmsL74U1ALrIh8Q/hqAnxzVpRCFAiEA9S0mHqbBOOyDZs3i15R223RPfkQVdASqrePeGILVHDY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDdbRvaegx3fO8QGdw99IJLW8yy7MoJ4ivHo5t/W4uNGgIhAKsL3pj7pnmMD6pobdZoD6sC/vDzxxpnLcIVK2JZ6rv/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/express-response-middleware@2.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23785},"main":"dist/index.js","types":"dist/index.d.mts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"test":"vitest run --coverage","build":"tsdown --format esm --format cjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2e415793-2f38-44e0-8f67-147eb0dbc47b"}},"repository":{"url":"git+https://github.com/marklai1998/express-response-middleware","type":"git"},"description":"Transform an express response","directories":{},"typesVersions":{"*":{"*":["./dist/index.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.23.1","vitest":"5.1.0","lefthook":"2.2.2","supertest":"7.3.1","typescript":"7.0.2","@types/node":"26.6.5","@biomejs/biome":"2.6.2","@types/express":"5.0.6","@commitlint/cli":"21.2.4","@types/supertest":"7.2.1","@vitest/coverage-v8":"5.1.0","@marklai/shared-config-biome":"1.0.2","@marklai/shared-config-commitlint":"1.1.2","@marklai/shared-config-typescript":"1.1.2"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/express-response-middleware_2.3.0_1794542272171_0.36425318085957903","host":"s3://npm-registry-packages-npm-production"}},"2.3.1":{"_id":"express-response-middleware@2.3.1","bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"dist":{"shasum":"61eebdcc9e02a448616e82bbb34949cbadcfe137","tarball":"https://registry.npmjs.org/express-response-middleware/-/express-response-middleware-2.3.1.tgz","fileCount":7,"integrity":"sha512-Z+tI4hhJZSeqSrfjtiVmZli1XZXO2w7tPjIUwDsa8LFh5tDxZ3Ui4wdLK08DgHzms3++90CpFYwVTJUSipCcug==","signatures":[{"sig":"MEUCIFFa5EwzDhj+fTxA/L0dCXKg0uYsMbYRECf0VVf1Jfw2AiEAvCk7FayIIhCdEyIpj5jPDWtqpS88bwW8rAyvjzgK3ZA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH2pCwM8Wpkbu0lh3Nq2o04DU11KcGbrQ1Fg+JjpUw2gAiAa+LM/e9FewlQ7cDSqZG3XvwMwmi65/7aeX/2AcNIgBQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/express-response-middleware@2.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23788},"main":"dist/index.cjs","name":"express-response-middleware","types":"dist/index.d.mts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"license":"MIT","scripts":{"test":"vitest run --coverage","build":"tsdown --format esm --format cjs"},"version":"2.3.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2e415793-2f38-44e0-8f67-147eb0dbc47b"}},"homepage":"https://github.com/marklai1998/express-response-middleware#readme","keywords":["mung","middleware","transform","response","express"],"repository":{"url":"git+https://github.com/marklai1998/express-response-middleware","type":"git"},"description":"Transform an express response","directories":{},"maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"typesVersions":{"*":{"*":["./dist/index.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"0.23.1","vitest":"5.1.0","lefthook":"2.2.2","supertest":"7.3.1","typescript":"7.0.2","@types/node":"26.6.5","@biomejs/biome":"2.6.2","@types/express":"5.0.6","@commitlint/cli":"21.2.4","@types/supertest":"7.2.1","@vitest/coverage-v8":"5.1.0","@marklai/shared-config-biome":"1.0.2","@marklai/shared-config-commitlint":"1.1.2","@marklai/shared-config-typescript":"1.1.2"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/express-response-middleware_2.3.1_1794803472248_0.10560523474944894"}}},"time":{"created":"2025-03-03T01:31:04.765Z","modified":"2026-11-16T04:31:12.683Z","1.0.0":"2025-03-03T01:31:04.918Z","2.0.0":"2025-03-15T21:50:09.259Z","2.0.1":"2025-03-15T21:59:49.166Z","2.1.0":"2025-03-15T22:46:35.833Z","2.1.2":"2025-05-25T05:21:52.270Z","2.1.3":"2025-05-26T00:55:53.577Z","2.2.0":"2025-11-03T22:04:39.131Z","2.3.0":"2026-11-13T03:57:52.275Z","2.3.1":"2026-11-16T04:31:12.347Z"},"bugs":{"url":"https://github.com/marklai1998/express-response-middleware/issues"},"license":"MIT","homepage":"https://github.com/marklai1998/express-response-middleware#readme","keywords":["mung","middleware","transform","response","express"],"repository":{"url":"git+https://github.com/marklai1998/express-response-middleware","type":"git"},"description":"Transform an express response","maintainers":[{"name":"marklai1998","email":"marklai1998@pm.me"}],"readme":"# Express Response Middleware\n\n> [!NOTE]  \n> Come from express-mung? Checkout the [Migration Guide](docs/MIGRATE_FROM_MUNG.md)\n\n<div align=\"center\">\n\nMiddleware for express responses. Fork of [express-mung](https://www.npmjs.com/package/express-mung)\n\nThis package allows synchronous and asynchronous transformation of an express response. This is a similar concept to the express middleware for a request but for a response. Note that the middleware is executed in LIFO order. It is implemented by monkey patching (hooking) the `res.end`, `res.json`, `res.jsonp`, `res.send`, or `res.write` methods.\n\n![NPM](https://img.shields.io/npm/v/express-response-middleware) ![GitHub CI](https://github.com/marklai1998/express-response-middleware/actions/workflows/runTest.yml/badge.svg) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) [![npm type definitions](https://img.shields.io/npm/types/typescript.svg)](https://www.typescriptlang.org/)\n\n[Installation](#-installation) | [Quick Start](#-quick-start) | [API](#-api) | [Contributing](#-contributing)\n\n</div>\n\n## 📦 Installation\n\n### NPM\n\n```bash\nnpm i express-response-middleware\n```\n\n### Yarn\n\n```\nyarn add express-response-middleware\n```\n\n### PNPM\n\n```\npnpm i express-response-middleware\n```\n\n## 🚀 Quick Start\n\nSample middleware (redact.js) to remove classified information.\n\n```javascript\nimport { jsonMiddleware } from 'express-response-middleware';\n\n/* Remove any classified information from the response. */\nexport const hideSecretMiddleware = jsonMiddleware((body, req, res) => {\n  if (body.secret) body.secret = '****';\n  // ...\n  return body;\n});\n```\n\nthen add to your `app.js` file (before the route handling middleware)\n\n```javascript\napp.use(hideSecretMiddleware);\n```\n\n## 💻 API\n\n- [Json Middleware](#jsonmiddleware)\n- [Jsonp Middleware](#jsonpmiddleware)\n- [Send Middleware](#sendmiddleware)\n- [End Middleware](#endmiddleware)\n- [Write Middleware](#writemiddleware)\n- Legacy docs\n  - [V1](docs/V1_README.md)\n\n### `jsonMiddleware`\n\nIntercept `res.json`, allow transform the JSON body of the response.\n\n```ts\nimport { jsonMiddleware } from 'express-response-middleware';\n\nconst myMiddleware = jsonMiddleware((json, req, res) => {\n  // your code here\n  return json;\n});\n```\n\n### `jsonpMiddleware`\n\nIntercept `res.jsonp`, allow transform the JSON body of the response.\n\n```ts\nimport { jsonpMiddleware } from 'express-response-middleware';\n\nconst myMiddleware = jsonpMiddleware((json, req, res) => {\n  // your code here\n  return json;\n});\n```\n\n### `sendMiddleware`\n\nIntercept `res.send`, allow transform the body of the response.\n\n```ts\nimport { sendMiddleware } from 'express-response-middleware';\n\nconst myMiddleware = sendMiddleware((payload, req, res) => {\n  // your code here\n  return payload;\n});\n```\n\n### `endMiddleware`\n\nIntercept `res.end`, allow transform the HTTP headers of the response.\n\n```ts\nimport { endMiddleware } from 'express-response-middleware';\n\nconst myMiddleware = endMiddleware((req, res) => {\n  // your code here\n});\n```\n\n> [!CAUTION]\n> Sending a response while in `endMiddleware*` is **undefined behaviour** and will most likely result in an error\n\n### `writeMiddleware`\n\nIntercept `res.write` and `res.end`, allow transform each chunk of the body. Chunks are piped through a Node.js `Transform` stream, so async callbacks are processed in order and backpressure is respected.\n\n```ts\nimport { writeMiddleware } from 'express-response-middleware';\n\nconst myMiddleware = writeMiddleware((chunk, encoding, req, res) => {\n  // your code here\n  return chunk;\n});\n```\n\n- When `writeMiddleware` detects that a response has completed (i.e. if `res.end` has been called), it will abort.\n- Calling `res.json` or `res.send` from `writeMiddleware` ends the response; the remaining chunks are dropped.\n- Writes are flushed asynchronously, so `res.headersSent` may still be `false` right after `res.write`.\n- `Content-Length` is removed since the transformed body length is unknown; the response uses chunked encoding.\n- Chunk boundaries are not guaranteed: chunks may be merged as they pass through the stream.\n- `res.end` after `res.write` would not trigger endMiddleware, as header already sent\n\n## Exception handling\n\n`responseMiddleware` catches any exception (synchronous, asynchronous or Promise reject) and sends an HTTP 500 response with the exception message. You should handle your own error if you want different behavior\n\n## 🤝 Contributing\n\n### Development\n\n#### Local Development\n\n```bash\npnpm i\npnpm test\n```\n\n#### Build\n\n```bash\npnpm build\n```\n\n### Release\n\nThis repo uses [Release Please](https://github.com/google-github-actions/release-please-action) to release.\n\n#### To release a new version\n\n1. Merge your changes into the `main` branch.\n2. An automated GitHub Action will run, triggering the creation of a Release PR.\n3. Merge the release PR.\n4. Wait for the second GitHub Action to run automatically.\n5. Congratulations, you're all set!\n","readmeFilename":""}