How to use @politie/sherlock-rxjs - 1 common examples

To help you get started, we’ve selected a few @politie/sherlock-rxjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github politie / sherlock / scripts / process-bundle.js View on Github external
const a$ = sherlock.atom({ nested: { property: 'value' } });

let receivedValue
a$.react(v => receivedValue = v, { skipFirst: true });

assert.strictEqual(receivedValue, undefined);

const value$ = a$.pluck('nested').pluck('property');
assert.strictEqual(value$.get(), 'value');
value$.set('another value');

assert.deepStrictEqual(receivedValue, { nested: { property: 'another value' } });
assert.deepStrictEqual(utils.getStateObject(value$), { value: 'another value', resolved: true, errored: false });

assert.ok(rxjs.toObservable(a$));

console.log('Bundles ok.');

@politie/sherlock-rxjs

An extension to Sherlock that provides interop with RxJS.

Apache-2.0
Latest version published 1 month ago

Package Health Score

73 / 100
Full package analysis

Popular @politie/sherlock-rxjs functions