8000 GitHub - musicq/unwrapit: A graceful and intuitive way to handle errors in JS/TS.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

musicq/unwrapit

Repository files navigation

unwrapit

npm package

unwrapit provides a way to handle errors in JS/TS gracefully and intuitively.

Documentation

https://musicq.gitbook.io/unwrapit/

Getting start

npm i unwrapit

Usage

import {wrap} from 'unwrapit'

async function main() {
  const get = wrap(fetch)
  const res = await get('https://google.com')

  console.log(res.unwrap().status)
}

main()

About

A graceful and intuitive way to handle errors in JS/TS.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0