1.2.3 • Published 2 days ago

@onflow/util-invariant v1.2.3

Weekly downloads
442
License
Apache-2.0
Repository
github
Last release
2 days ago
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
}