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

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i unwrap.js

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.4 kB

    Total Files

    9

    Last publish

    Collaborators

    • arguiot