0.0.4 • Published 5 years ago

@emit-js/type v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@emit-js/type

emit type checking

type

Install

npm install @emit-js/type

Setup

var emit = require("@emit-js/emit")()
require("@emit-js/type")(emit)

Usage

expect(emit.type("")).toBe("string")

expect(
  emit.typeCheck({ check: "", type: "string" })
).toBeTruthy()

expect(
  emit.typeCheck({ check: true, type: "any" })
).toBeTruthy()

expect(
  emit.typeCheck({ check: true, type: "boolean | string" })
).toBeTruthy()

Valid types

  • array
  • boolean
  • date
  • error
  • function
  • null
  • number
  • object
  • promise
  • regexp
  • string
  • symbol
0.0.4

5 years ago

0.0.2

5 years ago