0.2.5 • Published 7 years ago

lutils-typeof v0.2.5

Weekly downloads
830
License
-
Repository
github
Last release
7 years ago

typeOf lutils-typeof

Reliable type checks for javascript primitives

npm install lutils-typeof

import typeOf from "lutils-typeof"

// Returns a string
typeOf({}) // "object"
typeOf(5000) // "number"
typeOf(NaN) // "nan"

// Returns a boolean
typeOf.Object({}) // true
typeOf.Object(null) // false
typeOf.Boolean(false) // true
typeOf.String("string") // true
typeOf.Function(typeOf) // true
typeOf.Array([]) // true
typeOf.Number(600) // true
typeOf.Number(Infinity) // true
typeOf.Date(new Date()) // true
typeOf.RegExp(/test/i) // true
typeOf.NaN(NaN) // true

typeOf.null(null) // true
typeOf.Null(null) // true
typeOf.undefined(undefined) // true
typeOf.Undefined(undefined) // true
0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago