An open API service indexing awesome lists of open source software.

https://github.com/caiogondim/strict-dict.js

Object (dictionary) that throws TypeError when trying to get an undefined property.
https://github.com/caiogondim/strict-dict.js

Last synced: 3 months ago
JSON representation

Object (dictionary) that throws TypeError when trying to get an undefined property.

Awesome Lists containing this project

README

        

# strict-dict


 Travis CI Coverage Status


Object (dictionary) that throws `TypeError` when trying to get an undefined property.

## Installation

```
npm install strict-dict -S
```

## Usage

```js
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](https://caiogondim.com)  · 
GitHub [@caiogondim](https://github.com/caiogondim)  · 
Twitter [@caio_gondim](https://twitter.com/caio_gondim)