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

is-too

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-too

simple validations

  • 2.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

is-too

A simple type checker slash validation module striving for code minimalism and a thorough test suite.

The primary use case for is-too is validating input from a form.

Installation

npm install is-too

Usage

var is = require('is-too')

var metal = "666" // |..|.  .|..|

if (is.present(metal) && is.integer(metal)) {
  headBang()
}

Checks

  • Operators
    • present
    • equal
    • unequal
    • exactly
    • notExactly
    • greaterThan
    • greaterThanOrEqualTo
    • lessThan
    • lessThanOrEqualTo
    • instanceOf
  • Primitives
    • boolean
    • nil
    • undef
    • false
    • falsy
    • true
    • truthy
  • Objects
    • object
    • plainObject
    • args
    • array
    • func
  • Regular Expressions
    • regex
    • match
  • Strings
    • string
    • emptyString
  • Numbers
    • number
    • numberString
    • integer
    • integerString
    • hexadecimal
    • hexadecimalString
    • zero
    • zeroString
  • Dates
    • date
    • sameDate
    • today
    • futureDate
    • pastDate

Antonyms

is.not[methodName] will return the inverse all methods.

is.not.greaterThan(1, 2) // true : 1 is not greater than 2

Helpers

  • toInteger, toInt: converts a number to an integer, and NaN to null because you can do math with null.
  • toNumber, toNum: same as toInt, but respects decimals.

Keywords

FAQs

Package last updated on 08 Jan 2016

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