@replygirl/proxied-behavior-subject

Recursively change the case of an object's keys

Usage no npm install needed!

<script type="module">
  import replygirlProxiedBehaviorSubject from 'https://cdn.skypack.dev/@replygirl/proxied-behavior-subject';
</script>

README

ProxiedBehaviorSubject

A BehaviorSubject that returns a Proxy. All the reactivity, without having to call next!

Note: I literally haven't tested this

Installation

yarn add @replygirl/proxied-behavior-subject

Usage

import ProxiedBehaviorSubject from '@replygirl/proxied-behavior-subject'

const foo = new ProxiedBehaviorSubject({
  bar: true
})

const f = foo.proxy

console.info(f.bar, foo.value.bar) // true, true

foo.next({ bar: false })

console.info(f.bar, foo.value.bar) // false, false

f.bar = true

console.info(f.bar, foo.value.bar) // true, true

License

ISC (c) 2020 replygirl