Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
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 cb = countn(5, function(err, results) {
console.log('results: ', results)
})
cb(null, 'this is example call')
setTimeout(function() {
cb(null, 'this is last call')
}, 500)
setTimeout(cb, 100)
setTimeout(cb, 200)
setTimeout(cb, 400)
Here is a example when error occured
var cb2 = countn(3, function(err) {
console.log('example exited with error: ' + err)
})
cb2(null, 'this is first ok call')
setTimeout(function() {
cb2('this is first error call')
}, 100)
setTimeout(function() {
cb2(null, 'this is second ok call')
}, 200)
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.
And i believe its much readable having everything in same hierarchy instead of complex nesting structures.
$ npm install
$ npm test
MIT
FAQs
Simple control flow, for counting callbacks
The npm package countn receives a total of 7 weekly downloads. As such, countn popularity was classified as not popular.
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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.