New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hyperquest-timeout

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperquest-timeout - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

1

index.js

@@ -7,4 +7,5 @@ function timeout(req, ms) {

req.on('response', function() { clearTimeout(t); });
return req;
}
module.exports = timeout;

2

package.json
{
"name": "hyperquest-timeout",
"version": "1.0.0",
"version": "1.1.0",
"description": "Timeout hyperquests!",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,2 +21,15 @@ hyperquest-timeout

timeout(req, 2000);
```
Or you can pipe `timeout` as it returns the original `req`:
```js
var hyperquest = require('hyperquest')
, timeout = require('hyperquest-timeout')
;
READABLE_STREAM
.pipe(timeout(hyperquest('http://uploaderthingie.com', 1500)))
.pipe(WRITABLE_STREAM)
;
```

@@ -34,1 +34,8 @@ var http = require('http')

});
test('chaining', function(t) {
timeout(hyperquest('http://localhost:5000/sweet'), 100)
.on('end', function() {
t.ok(true, 'it should allow for chaining')
t.end()
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc