Socket
Socket
Sign inDemoInstall

type-judge

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    type-judge

A small module to check javascript type


Version published
Maintainers
1
Install size
2.95 kB
Created

Readme

Source

type-judge

The library exported as Node.js modules.

Installation

Using npm:

$ npm i -g npm
$ npm i --save type-judge

Example

import jsType from type-judge

jsType.isBoolean()
jsType.isNumber()
jsType.isString()
jsType.isFunction()
jsType.isArray()
jsType.isDate()
jsType.isRegExp()
jsType.isObject()
jsType.isError()

console.log(jsType.isBoolean([1, 2, 3]))
// => false

console.log(jsType.isBoolean(false))
// => true

LICENSE MIT

Keywords

FAQs

Last updated on 02 Oct 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