Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
svelte-store2
Advanced tools
Sometimes you need to get the value of a store outside of a component or store that you are not subscribed to. Svelte provides a get() function for this, but it works by creating a temporary subscription, which may not be what you expect.
Store2 provides writable2
, derived2
and readable2
stores, each with a get()
method to retrieve the current store value.
Install the package:
npm install --save-dev svelte-store2
Then you can just replace the original Svelte stores with writable2
, derived2
or readable2
and benefit from using the get()
method:
import {writable2, derived2} from 'svelte-store2';
const w = writable2(0);
const d = derived2(w, $w => $w * 2);
w.get(); // 0
d.get(); // 0
w.set(2);
w.get(); // 2
d.get(); // 4
FAQs
Extended Svelte stores with additional methods.
The npm package svelte-store2 receives a total of 4 weekly downloads. As such, svelte-store2 popularity was classified as not popular.
We found that svelte-store2 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.