0.0.3 • Published 2 years ago
@deox/check-types v0.0.3
@deox/check-types
Utilities for checking types.
Installation
Install the package by running the following command in terminal:
npm install @deox/check-typesUsage
The module can be imported using import in ES Modules and require in Common JS as shown below:
ES Modules:
// index.ts
import { isPlainObject } from "@deox/check-types";
// ...Common JS:
// index.cjs
const { isPlainObject } = require("@deox/check-types");
// ...API
Following functions are available:
getClass(input): Returns the name of constructor class ofinputas string.isNull(arg): Checks whetherargisnullor notisArray(arg): Check whetherargis anArrayisString(arg): Check whetherargis aStringisFunction(arg): Check whetherargis aFunctionisBigInt(arg): Check whetherargis aBigIntisSymbol(arg): Check whetherargis aSymbolisBoolean(arg): Check whetherargis aBooleanisUndefined(arg): Check whetherargisundefinedisNumberAny(arg): Check whetherargis aNumberincludingNaNandInfinityisNaN(arg): Check whetherargisNaNisFinite(arg): Check whetherargisNumberand isFiniteisNumber(arg): Check whetherargis aNumberexcludingNaNandInfinityisObjectAny(arg): Check whetherargis anObjectincludingnullisObject(arg): Check whetherargis anObjectexcludingnullandArrayisPlainObject(arg): Check whetherargis a plain objectisRegExp(arg): Check whetherargis aRegExpisDate(arg): Check whetherargis aDateisURL(arg): Check whetherargis anURLisError(arg): Check whetherargis anError