fetching-object
v1.0.4
Published
```js import fetchingObject from "fetching-object"
Downloads
1,049
Readme
Fetching Object
Usage
import fetchingObject from "fetching-object"
const person = {
firstName: "Kasper"
lastName: "Stöckel"
}
const personWithFetching = fetchingObject(person)
person.firstName // "Kasper"
person.middleName // PropertyNotFoundError(`Property not found: ${prop}`)
person.lastName // "Stöckelconst shared = {
{person: person1}
}
const personWithFetching = fetchingObject(() => shared.person)
person.firstName // "Kasper"
person.middleName // PropertyNotFoundError(`Property not found: ${prop}`)
shared.person = {firstName: "Christina", lastName: "Stöckel"}
person.middleName // PropertyNotFoundError(`Property not found: ${prop}`)
person.firstName // "Christina"