Sign Up for Free

RunKit +

Try any Node.js package right in your browser

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 with all npm packages installed. Try it out:

var errors = require("")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors. v1.0.5

Custom error types and helper fns.

npm version npm downloads Twitter Follow

This project is part of the monorepo.


Custom error types and helper fns used by many packages in this repo.

This feature was previously part of the package.


yarn add



Usage examples

import * as err from "";

// Error: illegal arity: 3

err.illegalArgs("expected foo");
// Error: illegal argument(s): expected foo

// Error: illegal state: oops

err.unsupported("TODO not yet implemented")
// Error: unsupported operation: TODO not yet implemented


  • Karsten Schmidt


© 2018 Karsten Schmidt // Apache Software License 2.0

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free