Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Dark Aigle extends a native Promise or a promise library to have useful functions using dark power
Dark Aigle has dark power.
The library extends a native Promise or a Promise library to have Aigle functions.
It is mainly used for a native Promise because of Async/Await restrictuion. See Example.
You just need to call this library somewhere. The Promise will be extended.
require('dark-aigle')(Promise);
async function executeAsyncTask() {
await new Promise(resolve => setTimeout(resolve));
}
async function getArray() {
await executeAsyncTask();
return [1, 2, 3];
}
async function filterIterator(num) {
await executeAsyncTask();
return num % 2 === 1;
}
async function mapIterator(num) {
await executeAsyncTask();
return num * 2;
}
test();
async function test() {
const array = await getArray();
const boolList = await Promise.all(array.map(filterIterator));
const filtered = array.filter((n, i) => boolList[i]);
const result = await Promise.all(filtered.map(mapIterator));
console.log(result); // [2, 6]
}
If you use the library, you can make it simple and readable.
requrie('dark-aigle')(Promise);
test();
async function test() {
const result = await getArray()
.filter(filterIterator)
.map(mapIterator);
console.log(result); // [2, 6]
}
FAQs
Dark Aigle extends a native Promise or a promise library to have useful functions using dark power
We found that dark-aigle 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.