Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
countn is a simple control flow for counting callbacks.
$ npm install countn
Here is a example of simple async scheduling. Where we have subscribed to execute some code after all concurent tasks have finished.
var countn = require('countn')
var cb = countn(5, function(err, results) {
console.log('results:', results) // results: { all: [ [], [], [], [], [] ] }
})
setTimeout(cb(), 300)
setTimeout(cb(), 100)
setTimeout(cb(), 500)
setTimeout(cb(), 200)
setTimeout(cb(), 400)
Here is a example of simple async scheduling with named callbacks, so we could easily reuse results.
var countn = require('countn')
var cb = countn(5, function(err, results) {
console.log('first result: ', results.first) // undefined
})
setTimeout(cb('first'), 300)
setTimeout(cb('second'), 100)
setTimeout(cb('third'), 500)
setTimeout(cb('fourth'), 200)
setTimeout(cb('fifth'), 400)
countn is not ment to replace any control flow library, rather as i am still counting callbacks, i just wanted a simple library for a little suggar on top of it.
$ npm install
$ npm test
MIT
FAQs
Simple control flow, for counting callbacks
We found that countn 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.