Gathering detailed insights and metrics for async-sequential-runner
Gathering detailed insights and metrics for async-sequential-runner
Gathering detailed insights and metrics for async-sequential-runner
Gathering detailed insights and metrics for async-sequential-runner
@hideokamoto/sequential-promise
simply async function runner as a sequential
@randajan/revert
A minimalist utility for running sequential steps with automatic rollback on failure.
async-task-runner-pro
An advanced task management library for managing and executing complex asynchronous tasks.
TypeScript class for sequentially running async tasks to completion.
npm install async-sequential-runner
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
13 Stars
18 Commits
2 Watchers
12 Branches
1 Contributors
Updated on Sep 12, 2024
Latest Version
1.0.4
Package Id
async-sequential-runner@1.0.4
Unpacked Size
19.46 kB
Size
5.42 kB
File Count
16
NPM Version
6.9.0
Node Version
12.0.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A runner for async tasks that can pause their execution to ensure that each task runs to completion before the next task is started, instead of allowing new tasks to progress while one task is paused. Also allows registering cancelable triggers that will resolve when a task has completed running, to enable polling.
Written to support backends where multiple requests with intermittent pauses access a resource that should only be accessed sequentially (such as when building a flushout master model with event sourcing).
npm install --save async-sequential-runner
import { AsyncSequentialRunner } from 'async-sequential-runner';
const resource = {
counter: 1
}
// Create a runner
const runner = new AsyncSequentialRunner<number>();
const resolver: { resolveFn?: () => void } = {};
const blocker = new Promise((resolve, reject) => {
resolver.resolveFn = resolve;
});
// Push some tasks onto the runner that get a value before blocking on some resource
// If the tasks were to start running in parallel, they would return the same value
const task1 = runner.run(async () => {
const value = resource.counter;
await blocker;
resource.counter += 1;
return value;
});
const task2 = runner.run(async () => {
const value = resource.counter;
await blocker;
resource.counter += 1;
return value;
});
// Await the tasks in parallel
const all = Promise.all([task1, task2])
resolver.resolveFn!();
const results = await all;
// Note that the tasks did not run in paralllel
expect(results[0]).toBe(1);
expect(results[1]).toBe(2);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/18 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
47 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More