@onflow/util-invariant
v1.2.4
Published
Flow JS SDK Util -- Invariant
Downloads
67,222
Maintainers
Keywords
Readme
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
}