
Research
npm Malware Targets Telegram Bot Developers with Persistent SSH Backdoors
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
svelte-persisted-store
Advanced tools
[](https://www.npmjs.com/package/svelte-persisted-store) [](LICENSE.md) [
Then when you want to use the store:
import { get } from 'svelte/store'
import { preferences } from './stores'
preferences.subscribe(...) // subscribe to changes
preferences.update(...) // update value
preferences.set(...) // set value
get(preferences) // read value
$preferences // read value with automatic subscription
You can also optionally set the serializer
, storage
and onError
type:
import * as devalue from 'devalue'
// third parameter is options.
export const preferences = persisted('local-storage-key', 'default-value', {
serializer: devalue, // defaults to `JSON`
storage: 'session', // 'session' for sessionStorage, defaults to 'local'
syncTabs: true // choose wether to sync localStorage across tabs, default is true
onError: (e) => {/* Do something */} // Defaults to console.error with the error object
})
As the library will swallow errors encountered when reading from browser storage it is possible to specify a custom function to handle the error. Should the swallowing not be desirable, it is possible to re-throw the error like the following example (not recommended):
export const preferences = persisted('local-storage-key', 'default-value', {
onError: (e) => {
throw e
}
})
MIT
FAQs
[](https://www.npmjs.com/package/svelte-persisted-store) [](LICENSE.md) [![codecov](https://codecov.io/gh/joshnuss/sv
The npm package svelte-persisted-store receives a total of 14,813 weekly downloads. As such, svelte-persisted-store popularity was classified as popular.
We found that svelte-persisted-store demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
Security News
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.