
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
A JavaScript library of async/await helpers
objectKind: global namespace
object
functionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctionfunctiontaskFunctionfunctionfunction const task = Callbackify(
async (i) => i + 1
);
// logs 'res 1', eventually
task(
(err, res) => console.log('res', res),
0
);
Kind: static property of aah
Returns: function - a callback-expecting function
Params
function - an async functionfunction let task = CatchError(task);
const { error, result } = await task(request);
Kind: static property of aah
Returns: function - an async wrapper function around the task
Params
function - an async function to wrap around with a catch wrapper.function const task = Delay(1000);
const result = await task(1); // result is 1, after 1 second
Kind: static property of aah
Returns: function - an async function
Params
number - the time to delayfunction const task = InOrder(
async (i) => i + 1,
async (i) => i + 1,
async (i) => i + 1
);
const results = await task(0); // results is 3
Kind: static property of aah
Returns: function - an async wrapper function that runs all of the tasks in order, calling each one with original request
Params
function - any number of async tasks.function const task = InParallel(
async (i) => i + 1,
async (i) => i + 2,
async (i) => i + 3
);
const results = await task(0); // results is [1, 2, 3]
Kind: static property of aah
Returns: function - an async wrapper function that runs all the tasks in parallel, and returns an array of results
Params
function - any number of async tasks.function const task = InSeries(
async (i) => i + 1,
async (i) => i + 1,
async (i) => i + 1
);
const results = await task(0); // results is 3
Kind: static property of aah
Returns: function - an async wrapper function that runs all of the tasks in series, calling each one with the results of the previous one
Params
function - any number of async tasks.function const task = ParallelFilter(
async (val, i) => val % 2 === 0
);
const results = await task([0, 1, 2]); // results is [0, 2]
Kind: static property of aah
Returns: function - an async wrapper function that takes in an array of requests, runs the task in parallel, once for each input in the array, and returns an array of results
Params
function - the filtering taskfunction const task = ParallelMap(
async (val, i) => val + 1
);
const results = await task([0, 1, 2]); // results is [1, 2, 3]
Kind: static property of aah
Returns: function - an async wrapper function that takes in an array of requests, runs the task in parallel, once for each input in the array, and returns an array of results
Params
function - the mapping task const task = PassThrough;
const results = await task(0); // results is 0
PassThrough does nothing, just passes the request through as the result
Kind: static property of aah
function const task = Promisify(
(onDone, i) => onDone(
i === 0 ? new Error('i cant be 0') : null,
i + 1
),
);
const results = await task(1); // results is 2
const results2 = await taks(0); // throws 'i cant be 0 Error
Kind: static property of aah
Returns: function - an async function
Params
function - a callback-expecting functionfunction const task = Race(
async (i) => i + 1,
async (i) => i + 2,
);
const result = await task(1); // 2
Kind: static property of aah
Returns: function - an async task that resolves or rejects as soon as the first one of its "children" resolves or rejects
Params
function - any number of async tasksfunction const task = TimeIn(async (i) => i + 1, 1000);
const result = await task(1); // result1 = 2, after 1000 ms
Kind: static property of aah
Returns: function - an async task
Params
function - an async taskfunction - the minimum time the task can takefunction const task1 = TimeOut( Delay(100), 1000);
const task2 = TimeOut( Delay(1000), 100);
const result1 = await task1(1); // result1 = 1, after 100 ms
const result2 = await task2(1); // throws a timeout error after 100 ms
Kind: static property of aah
Returns: function - an async task
Params
function - an async tasksfunction - the number of ms before throwing an errortaskFunctionBuilds an async assertion task. When called, if the arguments do not match the validator functions,
Kind: static method of aah
Returns: taskFunction - an assertion task
Params
function - a function that checks the request.string - an optional error message to throw if the assertion fails, or a message builder function.functionA logging utility. It passes the request received into all the statements, collects the results, and pushes them into console.log
Kind: static method of aah
Returns: function - a logging task
Params
* - any number of logging values. Functions are called with the calling request, everything else is passed directly toFAQs
A library of async/await helpers
We found that aah 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.