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.
@mr96/use-timeline
Advanced tools
An enchanced useState hook which keeps track of the states history, allowing you to undo and redo states.
An enchanced useState hook which keeps track of the states history, allowing you to undo and redo states.
useTimeline is a simple hook based on the useState hook which abstracts operations of undo and redo.
A full example is avaiable on here.
With npm:
npm install @mr96/use-timeline
With yarn:
yarn add @mr96/use-timeline
import { useTimeline } from '@mr96/useTimeline';
export default function App() {
const {
// current state
state,
// set a new state (same API as setState)
setState,
// undo by 1 step
undo,
// redo by 1 step
redo,
// true if there is an undoable state
canUndo,
// true if there is a redoable state
canRedo,
...additionalProps
} = useTimeline('');
const onChange = (event: ChangeEvent<HTMLInputElement>) => {
setState(event.target.value);
};
return (
<button disabled={!canUndo} onClick={() => undo()}>
Undo
</button>
<input type="text" onChange={onChange} value={state} />
<button disabled={!canRedo} onClick={() => redo()}>
Redo
</button>
)
}
FAQs
An enchanced useState hook which keeps track of the states history, allowing you to undo and redo states.
We found that @mr96/use-timeline 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.