
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.
A simple state observing mechanism that only fires when the stored value is compared to true.
A simple state observing mechanism that only fires when the stored value is compared to true.
Contains a callback function that fires depending on the truthfulness of validFn.
Contains a callback function that fires depending on the truthfulness of the parent state.
var states = new Nestate()Creates a new group of State and Action.
Nestate.addState(key, value, options:{callbackFn?, validFn?})Adds a new state into the group. Throws new Error when the key already exists.
keyThe key of the state
valueThe value of the state
optionsContains callbackFn and validFn.
Defaults to:
options = {
callbackFn: (val)=>{},
validFn: (val)=>true
}
options.callbackFnThe callback function when validFn returns true.
options.validFnState validity check function.
Nestate.updateState(key, value)Updates the value of the state by the key. Throws new Error when key is not found.
Nestate.setStateCallback(key, callbackFn)To be developed.
Nestate.setStateValidFunction(key, validFn)To be developed.
Nestate.getState(key)Returns the value of the state by key. Throws new Error when key is not found.
Nestate.addAction(key, fn, dependsOn=[], options={})Adds a new action depeding on the dependsOn array of states.
"AND" or "OR".
| Flag | Effect |
|---|---|
"AND" | All parents' validity must be true to fire the action |
"OR" | Only requires one of the parents' validity to be true to fire the action |
FAQs
A simple state observing mechanism that only fires when the stored value is compared to true.
We found that nestate 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.