Registry / testing / connect-pause

connect-pause

JSON →
library0.1.0jsnpmunverified

A Connect/Express middleware for simulating latency during development. Version 0.1.0, last updated in 2013, with no recent releases. It allows pausing all or specific requests by a given number of milliseconds, and optionally returning an error after the delay. Lightweight and simple, it is suitable for debugging but lacks TypeScript support and has not seen recent maintenance.

npm install connect-pause
INSTALL
IMPORT
SIG · CONNECT-PAUSE
C
connect-pause
testingjavascriptv0.1.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import pause from 'connect-pause'
✗ const pause = require('connect-pause')
ES modules are supported if the environment supports them; CommonJS require also works.
default
✓ const pause = require('connect-pause')
CommonJS pattern as used in Node.js with Express.
pause
✓ const pause = require('connect-pause')
✗ import { pause } from 'connect-pause'
The package exports a single function as default, not a named export.

Sets up an Express server that pauses all requests for 2 seconds before responding.

import express from 'express'; import pause from 'connect-pause'; const app = express(); app.use(pause(2000)); // pause all requests by 2 seconds app.get('/', (req, res) => { res.send('Response after 2 seconds'); }); app.listen(3000, () => console.log('Server running on port 3000'));
Debug
Known issues
deprecatedPackage has not been updated since 2013.
fix
Consider using alternative middleware or maintaining the package yourself.
affects: >=0.0.0
gotchaThe error parameter is passed to next(), which Express interprets as an error and may not result in the expected status code.
fix
Set the error object's status or use a custom error handler.
affects: >=0.0.0
gotchaRequires express or connect; not compatible with other frameworks without middleware adaptation.
fix
Wrap the middleware for compatibility if needed.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'connect-pause'
Package not installed or not found in node_modules.
fix
Run 'npm install connect-pause' to install the package.
TypeError: pause is not a function
Incorrect import: using named import instead of default import.
fix
Use 'import pause from 'connect-pause'' or 'const pause = require('connect-pause')'.
Error: middleware is not a function
Passing arguments incorrectly or using the middleware without calling it.
fix
Call pause(ms) to return a middleware function, e.g., app.use(pause(1000)).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
OpenAI (training)
1
Resources
connect-pause — npm install connect-pause · libregistry