Gathering detailed insights and metrics for promist
Gathering detailed insights and metrics for promist
Gathering detailed insights and metrics for promist
Gathering detailed insights and metrics for promist
@zalastax/nolb-promist
Subpackage of no-one-left-behind.
promistreamus
Convert Stream into an Iterator yielding value promises
promistate
Manage promise state easily
@promistream/simple-sink
A generic sink stream for [Promistreams](https://promistream.cryto.net/) that can cover most usecases. It automatically drives the pipeline above it once it is read from once, in its default configuration.
npm install promist
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (92.55%)
JavaScript (7.45%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
168 Commits
2 Watchers
4 Branches
1 Contributors
Updated on Jul 17, 2024
Latest Version
6.0.0
Package Id
promist@6.0.0
Unpacked Size
72.32 kB
Size
20.11 kB
File Count
39
NPM Version
10.8.1
Node Version
22.3.0
Published on
Jul 17, 2024
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 dependable promises and async utility belt.
ExtensiblePromise
: a safe to extend promise class.CancellablePromise
: a cancellable promise.
DeferredPromise
: an externally actionable promise.
LazyPromise
: a promise that will not execute until awaited.
SyncPromise
: a promise with values synchronously available and operable.
control
: for async flow control via generators.isPromise
: a type guard for promises.isPromiseLike
: a type guard for thenable objects.control(test: Function, generator: Function): Function
Used to control async flow. It returns a promise returning function taking the same arguments as generator
.
test
: a test function (can be async
) that will be run before calling each next()
on generator
, with signature () => Promise<boolean | Error> | boolean | Error
. It can return:
false
: generator
will not continue execution (it will never resolve).true
: generator
will continue execution until the next yield
.Error
: generator
call will return a rejected promise. The same behavior can be expected if the error is thrown instead of returned.generator
: must be a generator function. Within it, you'd use yield
as you would await
for an async
function.1import { control } from 'promist'; 2 3function* gen(n) { 4 // You can use yield as you'd use await 5 let res = yield Promise.resolve(n * 2); 6 // test() will be called here, 7 // if it returns falsy or throws an error this next line won't execute 8 res = yield Promise.resolve(res * 5); 9 10 return res; 11} 12 13const willContinue = control(() => true, gen); 14const willNotContinue = control(() => false, gen); 15const willReject = control(() => new Error('An error ocurred'), gen); 16 17willContinue(1).then(console.log); // 10 18willNotContinue(2).then(console.log); // Will not resolve 19willReject(3).then(console.log).catch(console.error); // Error: An error occurred
isPromise(value: any): boolean
Returns true
if value
is a thenable and catchable, false
otherwise.
value
: object to test.1import { isPromise } from 'promist'; 2 3if (isPromise(promise)) { 4 promise.then(() => { /* ... */ }).catch(() => { /* ... */ }); 5}
isPromiseLike(value: any): boolean
Returns true
if value
is a thenable, false
otherwise.
value
: object to test.1import { isPromiseLike } from 'promist'; 2 3if (isPromiseLike(promise)) { 4 promise.then(() => { /* ... */ }); 5}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
20 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