nodejs 类型检查
Npm https://www.npmjs.com/package/is-type-of
Github https://github.com/node-modules/is-type-of

is-type-of 依赖

core-uitl-is

  1. is.array(arr)
  2. is.boolean(bool)
  3. is.null(null)
  4. is.nullOrUndefined(null)
  5. is.number(num)
  6. is.string(str)
  7. is.symbol(sym)
  8. is.undefined(undef)
  9. is.regExp(reg)
  10. is.object(obj)
  11. is.date(date)
  12. is.error(err)
  13. is.function(fn)
  14. is.primitive(prim)
  15. is.buffer(buf)

is-stream

  1. is.stream(stream)
  2. is.readableStream(readable)
  3. is.writableStream(writable)
  4. is.duplexStream(duplex)

is-class

  1. is.class(obj)
  2. is.finite(num)
  3. is.NaN(NaN)
  4. is.generator(gen)
  5. is.generatorFunction(fn)
  6. is.promise(fn)
  7. is.int(int)
  8. is.double(double)
  9. is.int32(int)
  10. is.long(long)
  11. is.Long(Long)