unwrap.js

1.0.0 • Public • Published

UnwrapJS

Safely unwrap optionnal values. It's very tiny module (94 bytes) that checks if a value can safely be used

const { unwrap } = require("unwrap.js")

unwrap(undefinedObject) // {}
unwrap(undefinedObject, []) // []

obj = ["hello"]
unwrap(obj) // ["hello"]

Readme

Keywords

Package Sidebar

Install

npm i unwrap.js

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.4 kB

Total Files

9

Last publish

Collaborators

  • arguiot