Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@patrtorg/distinctio-ea
Advanced tools
[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-im
ES 2021 spec-compliant shim for Promise.any. Invoke its "shim" method to shim Promise.any
if it is unavailable or noncompliant. Note: a global Promise
must already exist: the es6-shim is recommended.
This package implements the es-shim API interface. It works in an ES3-supported environment that has Promise
available globally, and complies with the spec.
Most common usage:
var assert = require('assert');
var any = require('@patrtorg/distinctio-ea');
var resolved = Promise.resolve(42);
var rejected = Promise.reject(-1);
var alsoRejected = Promise.reject(Infinity);
any([resolved, rejected, alsoRejected]).then(function (result) {
assert.equal(result, 42);
});
any([rejected, alsoRejected]).catch(function (error) {
assert.ok(error instanceof AggregateError);
assert.deepEqual(error.errors, [-1, Infinity]);
});
any.shim(); // will be a no-op if not needed
Promise.any([resolved, rejected, alsoRejected]).then(function (result) {
assert.equal(result, 42);
});
Promise.any([rejected, alsoRejected]).catch(function (error) {
assert.ok(error instanceof AggregateError);
assert.deepEqual(error.errors, [-1, Infinity]);
});
Simply clone the repo, npm install
, and run npm test
The @patrtorg/distinctio-ea
package was released as now-deprecated v0.1.0 and v0.1.1, as a fork of https://github.com/m0ppers/promise-any.
Thanks to @sadorlovsky for donating the repo and the @patrtorg/distinctio-ea
npm package!
FAQs
[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-im
The npm package @patrtorg/distinctio-ea receives a total of 0 weekly downloads. As such, @patrtorg/distinctio-ea popularity was classified as not popular.
We found that @patrtorg/distinctio-ea demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.