@allforabit/errors
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@thi.ng/errors

npm (scoped)

This project is part of the @thi.ng/umbrella monorepo.

About

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

This feature was previously part of the @thi.ng/api package.

Installation

yarn add @thi.ng/errors

Dependencies

None

Usage examples

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

Authors

  • Karsten Schmidt

License

© 2018 Karsten Schmidt // Apache Software License 2.0

Readme

Keywords

Package Sidebar

Install

npm i @allforabit/errors

Weekly Downloads

2

Version

0.1.3

License

Apache-2.0

Unpacked Size

19.6 kB

Total Files

15

Last publish

Collaborators

  • allforabit