JSPM

@pnmasharov/type-check

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q7036F
  • License ISC

A small set of functions to check value against a specific type

Package Exports

  • @pnmasharov/type-check
  • @pnmasharov/type-check/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@pnmasharov/type-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Type-check

A small set of functions to check your values for a specific type

  1. Installation
npm install @pnmasharov/type-check
  1. Usage
import {
  checkIsString,
  checkIsNumber,
  checkIsNumberPositive,
  checkIsNumberNegative,
  checkIsZero,
  checkIsFinite,
  checkIsArray,
  checkIsObject,
  checkIsNull,
  checkIsUndefined,
  checkIsFunction,
} from "@pnmasharov/type-check"

// or
// const { checkIsNumber } = require("@pnmasharov/type-check")

let amount = 13,2
if (checkIsNumber(amount)) {
  // here you can work with your number
}