New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@typemon/check

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typemon/check

A collection of frequently used, safe and intuitive type checking and comparison functions.

latest
Source
npmnpm
Version
5.2.0
Version published
Weekly downloads
80
95.12%
Maintainers
1
Weekly downloads
 
Created
Source

Check - version license typescript-version gitlab-pipeline coverage

A collection of frequently used, safe and intuitive type checking and comparison functions. Resolve inconsistencies between global functions and methods of primitive wrapper objects. You no longer need to write duplicate code or use exclamation marks. It provides the most basic functionality without dependencies, so you don't have to worry about overhead or code size. Fully integrated with the TypeScript type system, you can expect high productivity.

Features

Each function is well documented through comments. It is also easy to understand because it is linked to MDN documents.

  • equal, notEqual
  • less, lessOrEqual
  • greater, greaterOrEqual
  • isIn, isNotIn
  • instanceOf, notInstanceOf
  • isBoolean, isNotBoolean
  • isTrue, isNotTrue
  • isFalse, isNotFalse
  • isTruthy, isFalsy
  • isString, isNotString
  • isNumber, isNotNumber
  • isNaN, isNotNaN
  • isFinite, isInfinite
  • isInteger, isNotInteger
  • isFloat, isNotFloat
  • isUndefined, isNotUndefined
  • isNull, isNotNull
  • isUndefinedOrNull, isNotUndefinedAndNotNull
  • isSymbol, isNotSymbol
  • isFunction, isNotFunction
  • isObject, isNotObject
  • isArray, isNotArray
  • isConstructor, isNotConstrutor
  • isIterable, isNotIterable
  • isAsyncIterable, isNotAsyncIterable

Installation

$ npm install @typemon/check

Usage

import { Check } from '@typemon/check';
const value: boolean | number | string | . . . = generateValue();

if (Check.isBoolean(value)) {
    . . .
}
else if (Check.isNumber(value)) {
    . . .
}
else {
    . . .
}
const value: Example | typeof Example = generateValue();

if (Check.isConstructor(value)) {
    . . .
}
else {
    . . .
}

Keywords

monster-space-network

FAQs

Package last updated on 17 Aug 2020

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