nodejs 类型检查
Npm https://www.npmjs.com/package/is-type-of
Github https://github.com/node-modules/is-type-of
is-type-of 依赖
- core-util-is
- is-stream
- is-class
npm install is-type-of
core-uitl-is
- is.array(arr)
- is.boolean(bool)
- is.null(null)
- is.nullOrUndefined(null)
- is.number(num)
- is.string(str)
- is.symbol(sym)
- is.undefined(undef)
- is.regExp(reg)
- is.object(obj)
- is.date(date)
- is.error(err)
- is.function(fn)
- is.primitive(prim)
- is.buffer(buf)
is-stream
- is.stream(stream)
- is.readableStream(readable)
- is.writableStream(writable)
- is.duplexStream(duplex)
is-class
- is.class(obj)
- is.finite(num)
- is.NaN(NaN)
- is.generator(gen)
- is.generatorFunction(fn)
- is.promise(fn)
- is.int(int)
- is.double(double)
- is.int32(int)
- is.long(long)
- is.Long(Long)