🎨Export Wrapped Functions

It's common and useful for a library developer to export functions with a Result type. You can simply export your function by just wrap them.

Here's an example to show a safe function to parse JSON.

import {wrap} from 'unwrapit'

export const parseJson = wrap(JSON.parse)

Last updated