{"library":"string-replace-middleware","title":"string-replace-middleware","type":"library","description":"Express middleware that performs stream-based string replacement in HTTP response bodies on the fly. Current stable version is 1.1.0, released under MIT license, with infrequent updates. Key differentiator: works on the response stream before sending, unlike typical string replacement that buffers entire responses. Supports configurable Content-Type filtering via regex (default: text/*, application/json, application/xml). Ships TypeScript type declarations. Requires Node >=10 and Express. Not recommended for production with large or streaming responses due to potential performance overhead.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install string-replace-middleware"],"cli":null},"imports":["import { stringReplace } from 'string-replace-middleware'","const { stringReplace } = require('string-replace-middleware')","const stringReplace = require('string-replace-middleware').stringReplace"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/bfncs/string-replace-middleware","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/string-replace-middleware","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import express from 'express';\nimport { stringReplace } from 'string-replace-middleware';\n\nconst app = express();\n\napp.use(stringReplace({ 'foo': 'bar', 'hello': 'world' }));\n\napp.get('/', (req, res) => {\n  res.send('foo says hello');\n});\n\napp.listen(3000, () => console.log('Listening on 3000'));","lang":"typescript","description":"Sets up an Express app with string replacement middleware that replaces 'foo' with 'bar' and 'hello' with 'world' in all responses matching default content types.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}