@onflow/util-invariant
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published
import {invariant} from "@onflow/util-invariant"

function add(a, b) {
  invariant(typeof a === "number", "add(a, b) -- `a` needs to be a number", { a, b })
  invariant(typeof b === "number", "add(a, b) -- `b` needs to be a number", { a, b })
  return a + b
}

Readme

Keywords

none

Package Sidebar

Install

npm i @onflow/util-invariant

Homepage

onflow.org

Weekly Downloads

11,483

Version

1.2.2

License

Apache-2.0

Unpacked Size

15.8 kB

Total Files

14

Last publish

Collaborators

  • bthaile
  • jribbink
  • nialexsan
  • bakii_agl
  • han210
  • gregorggg
  • chasefleming
  • dapperj
  • gregsantos
  • derrickpelletier
  • dapper_labs
  • jeffreydoyle
  • harry.eth
  • turbolent_flow