
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@solid-primitives/set
Advanced tools
The Javascript built-in Set
& WeakSet
data structures as a reactive signals.
ReactiveSet
- A reactive version of a Javascript built-in Set
class.ReactiveWeakSet
- A reactive version of a Javascript built-in WeakSet
class.npm install @solid-primitives/set
# or
yarn add @solid-primitives/set
# or
pnpm add @solid-primitives/set
ReactiveSet
A reactive version of a Javascript built-in Set
class.
import { ReactiveSet } from "@solid-primitives/set";
const set = new ReactiveSet([1, 1, 2, 3]);
// listen for changes reactively
createEffect(() => {
[...set]; // => [1,2,3] (reactive on any change)
set.has(2); // => true (reactive on change to the result)
});
// apply like with normal Set
set.add(4);
set.delete(2);
set.clear();
ReactiveWeakSet
A reactive version of a Javascript built-in WeakSet
class.
import { ReactiveWeakSet } from "@solid-primitives/set";
const set = new ReactiveWeakSet([1, 1, 2, 3]);
// listen for changes reactively
createEffect(() => {
set.has(2); // => true (reactive on change to the result)
});
// apply changes like with normal Set
set.add(4);
set.delete(2);
See CHANGELOG.md
FAQs
The Set & WeakSet data structures as a reactive signals.
We found that @solid-primitives/set demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.