Socket
Socket
Sign inDemoInstall

is-type-of

Package Overview
Dependencies
2
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-type-of

complete type checking for node


Version published
Maintainers
1
Install size
42.0 kB
Created

Readme

Source

is-type-of

complete type checking for node, extend core-util-is

dependencies:

Install

npm install is-type-of

Example

var is = require('is-type-of');

is.array([1]); // => true
is.primitive(true); // => true
is.primitive({}); // => false
is.generatorFunction(function * () {}); // => true
is.long(Math.pow(2, 33)); // => true
is.double(0); // => false

API

From core-util-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)

from is-stream

is.stream(stream)
is.readableStream(readable)
is.writableStream(writable)
is.duplexStream(duplex)

Extend API

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)
  • Support Long instance.

License

MIT

Keywords

FAQs

Last updated on 10 May 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc