
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fetch-with-timeout
Advanced tools
The fetch API started out as a target for criticism because of lack of timeout and request cancelation. While those criticisms could be argued as fair or not, the you can't deny that the fetch API has been pretty awesome. As we've always done, if a feature is missing, we can always shim it in.
npm install --save fetch-with-timeout
// ES5
var fetchWithTimeout = require('fetch-with-timeout');
// ES6
import fetchWithTimeout from 'fetch-with-timeout';
/**
* fetch-with-timeout
* @param domain (required)
* @param options same as fetch options
* @param timeout fetch's timeout
* @returns Promise
*/
fetchWithTimeout(domain, [options], [timeout])
.then(function(res) {
console.log(res);
})
.catch(function(err) {
console.error(err);
});
Pull requests and suggestions are more than welcome!
FAQs
Fetch with timeout.
We found that fetch-with-timeout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.