
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Promise based flag for asynchronous condition, for javascript/Nodejs
npm i async-flag
const AsyncFlag = require('async-flag')
let flag = new AsyncFlag()
//Set the flag somewhere else
setTimeout(() => flag.set('hello'), 10)
//wait for the flag
let result = await flag.get() //result will be 'hello'
let flag = new AsyncFlag('my-conditiopn')
//Set the error somewhere else
setTimeout(() => flag.error('something wrong'), 10)
flag.get().catch(console.error) //prints 'something wrong'
let flag = new AsyncFlag('myFlag')
setTimeout(() => flag.set('hello'), 500)
flag.get(10).catch(console.log) //expected timeout, prints: "AsyncFlag timeout: myFlag"
flag.get(100).catch(console.log) //expected timeout, prints: "AsyncFlag timeout: myFlag"
flag.get(1000).then(console.log).catch(console.error) //expected resolve, prints "hello"
flag.get(1000).then(console.log).catch(console.error) //expected resolve, prints "hello"
let flag = new AsyncFlag()
flag.set('hello')
assert('hello' === await flag.get())
flag.reset() //reset the promise.
flag.set('hello3')
assert('hello3' === await flag.get())
FAQs
Promise based flag for asynchronous condition
We found that async-flag 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.