
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@myfave/promise-timeout
Advanced tools
A super-simple way to put a timeout on promise resolution.
It assumes you already have either platform support for promises (Node 0.12 or greater), or you have a polyfill (see es6-promise).
$ npm install promise-timeout
Rejects a promise with a TimeoutError if it does not settle within the
specified timeout. Parameters:
promise: Promise - Promise to monitor.timeoutMillis: number - Number of milliseconds to wait on settling.Exception indicating that the timeout expired.
ES2015:
import { timeout, TimeoutError } from 'promise-timeout';
let somePromise = goDoSomething();
timeout(somePromise, 1000)
  .then((thing) => console.log('I did a thing!'))
  .catch((err) => {
    if (err instanceof TimeoutError) {
      console.error('Timeout :-(');
    }
  });
ES5:
'use strict';
var pt = require('promise-timeout');
var somePromise = goDoSomething();
pt.timeout(somePromise, 1000)
  .then(function (thing) {
    console.log('I did a thing!');
  }).catch(function (err) {
    if (err instanceof pt.TimeoutError) {
      console.error('Timeout :-(');
    }
  });
FAQs
Simple timeouts for promises
The npm package @myfave/promise-timeout receives a total of 3 weekly downloads. As such, @myfave/promise-timeout popularity was classified as not popular.
We found that @myfave/promise-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.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.