1.0.0 • Published 2 years ago
with-flatten v1.0.0
Install
$ npm i with-flatten
API
Table of Contents
withFlatten
Mixins ctor
with parent
and camelCase flattens
and observes its properties mapping them back to the actual values.
Best used in conjuction with https://github.com/stagas/with-properties
const Foo = withFlatten(
SomeParent,
class {
deep = {
foo: 2,
}
}
)
const foo = new Foo()
foo.deepFoo = 4
expect(foo.deep.foo).toBe(4)
Parameters
parent
Pctor
Constructor\
Contribute
All contributions are welcome!
License
MIT © 2022 stagas
1.0.0
2 years ago