Socket
Socket
Sign inDemoInstall

is

Package Overview
Dependencies
0
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

is

the definitive JavaScript type testing library


Version published
Maintainers
2
Weekly downloads
1,904,555
increased by2.55%
Install size
56.9 kB

Weekly downloads

Readme

Source

is Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

The definitive JavaScript type testing library

To be or not to be? This is the library!

Installation

As a node.js module

$ npm install is

As a component

$ component install enricomarino/is

API

general

  • is.a (value, type) or is.type (value, type)
  • is.defined (value)
  • is.empty (value)
  • is.equal (value, other)
  • is.hosted (value, host)
  • is.instance (value, constructor)
  • is.instanceof (value, constructor) - deprecated, because in ES3 browsers, "instanceof" is a reserved word
  • is.nil (value)
  • is.null (value) - deprecated, because in ES3 browsers, "null" is a reserved word
  • is.undef (value)
  • is.undefined (value) - deprecated, because in ES3 browsers, "undefined" is a reserved word

arguments

  • is.args (value)
  • is.arguments (value) - deprecated, because "arguments" is a reserved word
  • is.args.empty (value)

array

  • is.array (value)
  • is.array.empty (value)
  • is.arraylike (value)

boolean

  • is.bool (value)
  • is.boolean (value) - deprecated, because in ES3 browsers, "boolean" is a reserved word
  • is.false (value) - deprecated, because in ES3 browsers, "false" is a reserved word
  • is.true (value) - deprecated, because in ES3 browsers, "true" is a reserved word

date

  • is.date (value)

element

  • is.element (value)

error

  • is.error (value)

function

  • is.fn (value)
  • is.function (value) - deprecated, because in ES3 browsers, "function" is a reserved word

number

  • is.number (value)
  • is.infinite (value)
  • is.decimal (value)
  • is.divisibleBy (value, n)
  • is.integer (value)
  • is.int (value) - deprecated, because in ES3 browsers, "int" is a reserved word
  • is.maximum (value, others)
  • is.minimum (value, others)
  • is.nan (value)
  • is.even (value)
  • is.odd (value)
  • is.ge (value, other)
  • is.gt (value, other)
  • is.le (value, other)
  • is.lt (value, other)
  • is.within (value, start, finish)

object

  • is.object (value)

regexp

  • is.regexp (value)

string

  • is.string (value)

encoded binary

  • is.base64 (value)
  • is.hex (value)

Symbols

  • is.symbol (value)

BigInts

  • is.bigint (value)

Contributors

Keywords

FAQs

Last updated on 14 Dec 2018

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