1.0.0 • Published 5 years ago

unwrap.js v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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"]
1.0.0

5 years ago