Gathering detailed insights and metrics for now-and-later
Gathering detailed insights and metrics for now-and-later
Gathering detailed insights and metrics for now-and-later
Gathering detailed insights and metrics for now-and-later
klump-react-native
Klump checkout view for React native
vue-markdown-book
+ Mac only for now. Windows support later. + It is a command cli. + It will process markdown files into website. + You can write vue code in markdown file, and also npm package is supported. + It will display content directly when touching file
naver-ratings-api
Scrapes ratings for a show from naver. Will be updated with more functions and better scraping later. Can only scrape the last 30 episodes as of now.
ngx-d3-liquid-fill-gauge
This project is now deprecated and moved to https://github.com/adedayo/ngx-liquid-gauge. If you must use this version, please use only version 1.0.0 because later versions are broken in newer Angular releases.
Map over an array or object of values in parallel or series, passing each through the async iterator, with optional lifecycle hooks.
npm install now-and-later
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
99.5
Quality
77.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
472,695,439
Last Day
115,703
Last Week
2,092,466
Last Month
9,468,732
Last Year
101,860,031
MIT License
24 Stars
37 Commits
10 Forks
4 Watchers
1 Branches
6 Contributors
Updated on Nov 05, 2023
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
now-and-later@3.0.0
Unpacked Size
14.70 kB
Size
4.16 kB
File Count
7
NPM Version
8.11.0
Node Version
16.14.2
Cumulative downloads
Total Downloads
Last Day
4%
115,703
Compared to previous day
Last Week
-9.8%
2,092,466
Compared to previous week
Last Month
1.3%
9,468,732
Compared to previous month
Last Year
15.5%
101,860,031
Compared to previous year
1
6
Map over an array or object of values in parallel or series, passing each through the async iterator, with optional lifecycle hooks.
1var nal = require('now-and-later'); 2 3function iterator(value, key, cb) { 4 // called with each value in sequence 5 // also passes the key 6 cb(null, value * 2); 7} 8 9function create(value, key) { 10 // called at the beginning of every iteration 11 // return a storage object to be passed to each lifecycle method 12 return { key: key, value: value }; 13} 14 15function before(storage) { 16 // called before the iterator function of every iteration 17 // receives the storage returned from `create` 18} 19 20function after(result, storage) { 21 // called after a success occurs in the iterator function of any iteration 22 // receives the `result` of the iterator and the storage returned from `create` 23} 24 25function error(error, storage) { 26 // called after an error occurs in the iterator function of any iteration 27 // receives the `error` of the iterator and the storage returned from `create` 28} 29 30function done(error, results) { 31 // called after all iterations complete or an error occurs in an iterator 32 // receives an `error` if one occurred and all results (or partial results upon error) of the iterators 33} 34 35/* 36 Calling mapSeries with an object can't guarantee order 37 It uses Object.keys to get an order 38 It is better to use an array if order must be guaranteed 39 */ 40nal.mapSeries( 41 [1, 2, 3], 42 iterator, 43 { 44 create: create, 45 before: before, 46 after: after, 47 error: error, 48 }, 49 done 50); 51 52nal.map( 53 { 54 iter1: 1, 55 iter2: 2, 56 }, 57 iterator, 58 { 59 create: create, 60 before: before, 61 after: after, 62 error: error, 63 }, 64 done 65);
map(values, iterator[, options][, callback])
Takes an object or array of values
and an iterator
function to execute with each value.
Optionally, takes an options
object and a callback
function that is called upon completion of the iterations.
All iterations run in parallel.
values
An array or object of values to iterate over.
If values
is an array, iterations are started in order by index. If values
is an object, iterations are started in order by the order returned by Object.keys
(order is not guaranteed).
If values
is an array, the results of each iteration will be mapped to an array. If values
is an object, the results of each iteration will be mapped to an object with corresponding keys.
iterator(value, key, done)
An async function called per iteration. All iterations are run in parallel.
The iterator
function is called once with each value
, key
and a function (done(error, result)
) to call when the async work is complete.
If done
is passed an error as the first argument, the iteration will fail and the sequence will be ended; however, any iterations in progress will still complete. If done
is passed a result
value as the second argument, it will be added to the final results array or object.
options
The options
object is primarily used for specifying functions that give insight into the lifecycle of each iteration. The possible extension points are create
, before
, after
and error
. If an extension point is not specified, it defaults to a no-op function.
The options
object for map
also allows specifying concurrency
in which to run your iterations. By default, your iterations will run at maximum concurrency.
options.concurrency
Limits the amount of iterations allowed to run at a given time.
options.create(value, key)
Called at the very beginning of each iteration with the value
being iterated and the key
from the array or object. If create
returns a value (storage
), it is passed to the before
, after
and error
extension points.
If a value is not returned, an empty object is used as storage
for each other extension point.
This is useful for tracking information across an iteration.
options.before(storage)
Called immediately before each iteration with the storage
value returned from the create
extension point.
options.after(result, storage)
Called immediately after each iteration with the result
of the iteration and the storage
value returned from the create
extension point.
options.error(error, storage)
Called immediately after a failed iteration with the error
of the iteration and the storage
value returned from the create
extension point.
callback(error, results)
A function that is called after all iterations have completed or one iteration has errored.
If all iterations completed successfully, the error
argument will be empty and the results
will be a mapping of the iterator
results.
If an iteration errored, the error
argument will be passed from that iteration and the results
will be whatever partial results had completed successfully before the error occurred.
mapSeries(values, iterator[, options][, callback])
Takes an object or array of values
and an iterator
function to execute with each value.
Optionally, takes an options
object and a callback
function that is called upon completion of the iterations.
All iterations run in serial.
values
An array or object of values to iterate over.
If values
is an array, iterations are started in order by index. If values
is an object, iterations are started in order by the order returned by Object.keys
(order is not guaranteed).
If values
is an array, the results of each iteration will be mapped to an array. If values
is an object, the results of each iteration will be mapped to an object with corresponding keys.
iterator(value, key, done)
An async function called per iteration. All iterations are run in serial.
The iterator
function is called once with each value
, key
and a function (done(error, result)
) to call when the async work is complete.
If done
is passed an error as the first argument, the iteration will fail and the sequence will be ended without executing any more iterations. If done
is passed a result
value as the second argument, it will be added to the final results array or object.
options
The options
object is primarily used for specifying functions that give insight into the lifecycle of each iteration. The possible extension points are create
, before
, after
and error
. If an extension point is not specified, it defaults to a no-op function.
options.create(value, key)
Called at the very beginning of each iteration with the value
being iterated and the key
from the array or object. If create
returns a value (storage
), it is passed to the before
, after
and error
extension points.
If a value is not returned, an empty object is used as storage
for each other extension point.
This is useful for tracking information across an iteration.
options.before(storage)
Called immediately before each iteration with the storage
value returned from the create
extension point.
options.after(result, storage)
Called immediately after each iteration with the result
of the iteration and the storage
value returned from the create
extension point.
options.error(error, storage)
Called immediately after a failed iteration with the error
of the iteration and the storage
value returned from the create
extension point.
callback(error, results)
A function that is called after all iterations have completed or one iteration has errored.
If all iterations completed successfully, the error
argument will be empty and the results
will be a mapping of the iterator
results.
If an iteration errored, the error
argument will be passed from that iteration and the results
will be whatever partial results had completed successfully before the error occurred.
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 5/29 approved changesets -- score normalized to 1
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
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-23
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