Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
straightforward-statejs
Advanced tools
A state object that is conditionally watchable on first depth only.
npm i -s straigtforward-state
or
yarn add straigtforward-state
import state from "straightforward-state";
or
const state = require("straightforward-state");
state.set = { things: [1,2,3], others: [3,4,5], numberOfThings: 6 };
or
state.set({ things: [1,2,3], numberOfThings: 3 });
Access values as usual
state.things // [1,2,3]
state.numberOfThings // 3
Set the state properties as usual. When set watchers will be run, mutations does not trigger however, like pushing to an array value.
state.things = [...state.things, 4];
state.watch.things = (val, was) => {
val // [1,2,3,4]
state.things // [1,2,3,4]
state.numberOfThings = state.things.length;
};
state.watch.numberOfThings((val, was) => {
val // 4
was // 3
});
FAQs
Straightforward StateJS, with conditional watching
The npm package straightforward-statejs receives a total of 0 weekly downloads. As such, straightforward-statejs popularity was classified as not popular.
We found that straightforward-statejs 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.