0.2.0 • Published 7 years ago
throw.flow v0.2.0
throw.flow
throw expression as a function
Import
import crash from "throw.flow"
API
throw
Just throws given error
. Function is also generic and has a output
type
parameter so that it's return type can be treated as anything you want.
import crash from "throw.flow"
crash(new Error("Boom")) // => Error: Boom
Parameters
error
reason
Returns output
Install
yarn add throw.flow --save
or with npm
npm install throw.flow --save
0.2.0
7 years ago