Socket
Socket
Sign inDemoInstall

is-type-of

Package Overview
Dependencies
3
Maintainers
2
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
Weekly downloads
410K
decreased by-0.39%
Maintainers
2
Install size
30.4 kB
Created
Weekly downloads
 

Changelog

Source

1.3.0 (2023-05-04)

Features

  • add d.ts support (#17) (edcedcc)

1.2.1 / 2018-09-22

fixes

others

1.2.0 / 2017-08-10

  • feat: Add async function test function. (#6)

1.1.0 / 2017-07-19

  • deps: upgrade is-class@0.0.4
  • feat: is.array() use Array.isArray() directly
  • feat: improve is.error performance
  • feat: improve is.regExp performance
  • test: support coverage
  • feat: imrpove is.date performance (#4)

1.0.0 / 2015-11-09

  • deps: update all dependencies
  • detect class

0.3.1 / 2014-06-20

  • add is.finite()

0.3.0 / 2014-05-10

  • split Long from long
  • fix history

0.2.1 / 2014-04-22

  • bump deps version
  • Merge pull request #1 from node-modules/support-long-module
  • is.long() support long module
  • refactor

0.2.0 / 2014-04-07

  • add readme for isstream
  • add isStream
  • add travis-yml

0.1.0 / 2014-04-03

  • add isNaN

0.0.2 / 2014-04-01

  • add is.int32

0.0.1 / 2014-03-12

  • add readme
  • add test, add number type checker
  • add core-util-is and generator promise
  • Initial commit

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)

from is-class

is.class(obj)

Extend API

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

License

MIT

Keywords

FAQs

Last updated on 04 May 2023

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