New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

of

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

of

type checking

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
56
decreased by-68.18%
Maintainers
1
Weekly downloads
 
Created
Source

##of

type checking

check type of value. returns capitalised name of type. e.g., 'Object', 'Function', 'Array':

of.type(value);

returns true if value is an element, otherwise false:

of.element(value);

returns true if value is a string, otherwise false:

of.string(value);

returns true if value is an array, otherwise false:

of.array(value);

returns true if value is an object, otherwise false:

of.object(value);

returns true if value is a function, otherwise false:

of['function'](value);

returns true if value is a boolean, otherwise false:

of.boolean(value);

returns true if value is a number, otherwise false:

of.number(value);

returns true if value is undefined, otherwise false:

of['undefined'](value);

returns true if value is an arguments array, otherwise false:

of['arguments'](value);

returns true if value is a regex, otherwise false:

of.regex(value);

returns true if value is null, otherwise false:

of['null'](value);

returns true if value is a date object, otherwise false:

of.date(value);

FAQs

Package last updated on 25 Jan 2015

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