strict-dict
v1.0.3
Published
Object (dictionary) that throws TypeError when trying to get an undefined property
Downloads
5
Readme
strict-dict
Object (dictionary) that throws TypeError
when trying to get an undefined property.
Installation
npm install strict-dict -S
Usage
const obj = strictDict({
a: 1,
b: 2
})
obj.a // -> 1
obj.b // -> 2
obj.c // -> throws TypeError, since c is undefined
Credits
- Icon by Thomas Helbig from the Noun Project
caiogondim.com · GitHub @caiogondim · Twitter @caio_gondim