Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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.');