Comparing version 5.0.0 to 6.0.0
@@ -1,4 +0,2 @@ | ||
'use strict'; | ||
module.exports = (request, time) => { | ||
export default function timedOut(request, time) { | ||
if (request.timeoutTimer) { | ||
@@ -55,2 +53,2 @@ return request; | ||
return request.on('error', clear); | ||
}; | ||
} |
{ | ||
"name": "timed-out", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"description": "Timeout HTTP/HTTPS requests", | ||
"license": "MIT", | ||
"repository": "sindresorhus/timed-out", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
@@ -27,5 +30,5 @@ "scripts": { | ||
"devDependencies": { | ||
"mocha": "^6.2.0", | ||
"xo": "^0.24.0" | ||
"mocha": "^8.3.2", | ||
"xo": "^0.39.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# timed-out [![Build Status](https://travis-ci.org/floatdrop/timed-out.svg?branch=master)](https://travis-ci.org/floatdrop/timed-out) | ||
# timed-out | ||
@@ -7,9 +7,7 @@ > Timeout HTTP/HTTPS requests | ||
## Usage | ||
```js | ||
const timedOut = require('timed-out'); | ||
const http = require('http'); | ||
const timedOut = require('timed-out'); | ||
import http from 'node:http'; | ||
import timedOut from 'timed-out'; | ||
@@ -20,3 +18,2 @@ const request = http.get('http://www.google.ru'); | ||
## API | ||
@@ -44,1 +41,7 @@ | ||
- `socket` - Time to wait for activity on the socket. | ||
## timed-out for enterprise | ||
Available as part of the Tidelift Subscription. | ||
The maintainers of timed-out and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-timed-out?utm_source=npm-timed-out&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4474
45
0
Yes
45