Socket
Socket
Sign inDemoInstall

typical

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typical

For type-checking Javascript values.


Version published
Weekly downloads
4.6M
increased by6.84%
Maintainers
1
Weekly downloads
 
Created
Source

view on npm npm module downloads per month Build Status Dependency Status

#typical For type-checking Javascript values.

####Example

var t = require("typical");

Contents

###isNumber(n) Returns true if input is a number

  • n * the input to test

Returns: boolean

####Example

> w.isNumber(0)
true
> w.isNumber(1)
true
> w.isNumber(1.1)
true
> w.isNumber(0xff)
true
> w.isNumber(0644)
true
> w.isNumber(6.2e5)
true
> w.isNumber(NaN)
false
> w.isNumber(Infinity)
false

###isPlainObject(input) Returns true if input type is object and not an Array

  • input * the input to test

Returns: boolean

####Example

> w.isPlainObject(new Date())
true
> w.isPlainObject({ clive: "hater" })
true
> w.isPlainObject([ 0, 1 ])
false

Keywords

FAQs

Package last updated on 09 Jun 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc