0.2.0 • Published 6 years ago
object-fetch v0.2.0
object-fetch
Allows to fetch object properties by its name, returns an error if those properties are missing
import objectFetch from 'object-fetch'
const obj = { a: 'b' }
objectFetch(obj, 'a') // => 'b'
objectFetch(obj, 'nonexistant') // throws ReferenceError