This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
@thi.ng/errors with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
This project is part of the @thi.ng/umbrella monorepo.
Custom error types and helper fns used by many packages in this repo.
This feature was previously part of the @thi.ng/api package.
yarn add @thi.ng/errors
import * as err from "@thi.ng/errors"; err.illegalArity(3) // Error: illegal arity: 3 err.illegalArgs("expected foo"); // Error: illegal argument(s): expected foo err.illegalState("oops"); // Error: illegal state: oops err.unsupported("TODO not yet implemented") // Error: unsupported operation: TODO not yet implemented
© 2018 Karsten Schmidt // Apache Software License 2.0