
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
alt-localstore
Advanced tools
This is a module for automatically saving and restoring store state from localStorage for react applications using alt and immutable.
First, make sure you make the setState() method public in the state constructor like so:
class MyStore {
constructor() {
this.exportPublicMethods({
setState: this.setState
});
}
}
Without this, the localstore won't be able to restore the store state from localStorage.
import LocalStore from 'alt-localstore';
import MyStore from './MyStore';
let myStore = alt.createStore(MyStore);
let localCache = new LocalStore(myStore);
localCache.restore();
Constructor takes in an alt store instance and an optional key to be used for localStorage which defaults to the store displayName.
Save the store state to localStorage. Automatically called on store state changes.
Takes in optional state param to save instead of the store state.
Restore the localStorage saved data to the state store. Defaults to {}.
Listen to store state changes and automatically persist the new state to localStorage.
Automatically called in the constructor.
Stop listening to store state changes.
Source code is written in es6 and is transpiled to es5 on npm publish. Default import retrieves the babel transpiled es5 version. The es6 source code can be found in src/index.js.
FAQs
save and restore alt store state to localStorage, listens to changes
The npm package alt-localstore receives a total of 2 weekly downloads. As such, alt-localstore popularity was classified as not popular.
We found that alt-localstore 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.