
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
svelte-to-rxjs
Advanced tools
A simple function that takes a svelte store and converts it into an RXJS observable, so the developer can apply RXJS operators to it. As Svelte subscription mechanism already works very nicely with Observables, it could be a real addition to the ecosystem.
This library exports the toObservable function and the fromSvelteStore function which takes your Svelte Store (Readable, Writabel, Derived) and gives you an Observable back.
Then you can add RXJS operators on them to do easy data transformations
Typescript: function toObservable<T>(svelteStore: Writable<T> | Readable<T>): Observable<T>
Javscript: function toObservable(svelteStore)
Typescript: function fromSvelteStore<T>(svelteStore: Writable<T> | Readable<T>): Observable<T>
Javscript: function fromSvelteStore(svelteStore)
Nothing - they are the same functions, just two diferent names.
Example svelte +page.svelte to show how to apply this function with a simple rxjs operator:
<script lang="ts">
import { writable } from 'svelte/store';
import { toObservable } from 'svelte-to-observable';
import { map } from 'rxjs/operators';
const w = writable<number>(0);
const stuff = toObservable<number>(w).pipe(map((x) => x + 10));
setTimeout(() => {
w.set(2);
}, 3000);
</script>
<h1>The count is {$stuff} or {$w}</h1>
<a href="/other">Go to other page so we can see unsubscribe run</a>
Also posted as issue for the Svelte ecosystem - hoping this/such function becomes part of the larger ecosystem https://github.com/sveltejs/svelte/issues/8173
FAQs
Simple function to transform your Svelte Store into Observable
We found that svelte-to-rxjs 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.