Type
TwitterGitHub
Draft
Draft
  • Introduction
  • ❤ Benefits
  • Getting started
    • Skeleton
    • Installation
      • npm
    • Public API
    • General concepts
  • Helper
    • recognizeValue()
      • Recognized instances
      • OfRecognized
    • resultCallback()
    • typeOf()
  • is
    • isArray()
    • isBigInt()
    • isBoolean()
    • isBooleanObject()
    • isBooleanType()
    • isClass()
    • isDate()
    • isDefined()
    • ★ isFalse()
    • isFunction()
    • isInstance()
    • isKey()
    • isNull()
    • ★ isNumber()
    • isNumberBetween()
    • isNumberObject()
    • isNumberType()
    • isObject()
    • isObjectKey()
    • isObjectKeyIn()
    • isObjectKeys()
    • isObjectKeysIn()
    • isObjectSomeKeys()
    • isPrimitive()
    • isRegExp()
    • ★ isString()
    • isStringIncludes()
    • isStringIncludesSome()
    • isStringLength()
    • isStringLengthBetween()
    • isStringObject()
    • isStringType()
    • isSymbol()
    • ★ isTrue()
    • isType()
    • isUndefined()
  • is not
    • isNotBoolean()
    • isNotDefined()
    • isNotFunction()
    • isNotNull()
    • isNotNumber()
    • isNotString()
    • isNotUndefined()
  • Are
    • areDeterminer()
      • every()
      • forEach()
      • some()
    • areBigInt()
      • every()
      • forEach()
      • some()
    • areBoolean()
      • every()
      • forEach()
      • some()
    • areDate()
      • every()
      • forEach()
      • some()
    • areDefined()
      • every()
      • forEach()
      • some()
    • ★ areFalse()
      • every()
      • forEach()
      • some()
    • areNull()
      • every()
      • forEach()
      • some()
    • ★ areNumber()
      • every()
      • forEach()
      • some()
    • areRegExp()
      • every()
      • forEach()
      • some()
    • ★ areString()
      • every()
      • forEach()
      • some()
    • areSymbol()
      • every()
      • forEach()
      • some()
    • ★ areTrue()
      • every()
      • forEach()
      • some()
    • areUndefined()
      • every()
      • forEach()
      • some()
  • Guard
    • guardArray()
    • guardBigInt()
    • guardBoolean()
    • guardClass()
    • guardDate()
    • guardDefined()
    • ★ guardFalse()
    • guardFunction()
    • guardInstance()
    • guardKey()
    • guardNull()
    • guardNumber()
    • guardNumberBetween()
    • guardObject()
    • guardObjectKey()
    • guardObjectKeyIn()
    • guardObjectKeys()
    • guardObjectKeysIn()
    • guardObjectSomeKeys()
    • guardPrimitive()
    • guardRegExp()
    • ★ guardString()
    • guardStringIncludes()
    • guardStringIncludesSome()
    • guardStringLength()
    • guardStringLengthBetween()
    • guardSymbol()
    • ★ guardTrue()
    • guardType()
    • guardUndefined()
  • object
    • are: Are {}
    • guard: Guard {}
    • guardIs: GuardIs {}
    • is: Is {}
    • isNot: IsNot {}
    • type {}
  • Interface
    • MinMax
  • Type
    • AnyBoolean
    • AnyNumber
    • AnyString
    • CallbackPayload
    • Constructor
    • Defined
    • ForEachCallback
    • GenericObject
    • Never
    • NotUndefined
    • NumberBetween
    • Primitive
    • Primitives
    • ResultCallback
    • StringOfLength
    • Type
    • Types
    • Undefined
  • Experimental
    • isParam()
  • GIT
    • Commit
    • Semantic Versioning
  • Change log
    • Keep a changelog
    • Unreleased
    • v5.0.0-rc.0
    • v4.2.0
  • License
    • MIT
  • Contact
    • ⋯ Chat
    • @ Email
  • Donate
    • ฿ Cryptocurrency
    • $ Fiat
Powered by GitBook
On this page
  • Function
  • Helper
  • is
  • isNot
  • are
  • guard
  • Object
  • Interface
  • Type

Was this helpful?

Edit on GitHub
  1. Getting started

Public API

PreviousInstallationNextGeneral concepts

Last updated 3 years ago

Was this helpful?

Function

Helper

Help to determine the value type.

// Helper.
import {
  recognizeValue, // From the `5.0.0` version
  typeOf,
} from '@angular-package/type';

is

// `is` prefix functions.
import {
  isArray,
  isBigInt,
  isBoolean,
  isBooleanObject,
  isBooleanType,
  isClass,
  isDate, // From the 4.2.0 version.
  isDefined,
  isFalse, // From the 4.2.0 version.
  isFunction,
  isInstance,
  isKey,
  isNull,
  isNumber,
  isNumberBetween, // From the 4.2.0 version.
  isNumberObject,
  isNumberType,
  isObject,
  isObjectKey,
  isObjectKeyIn,
  isObjectKeys,
  isObjectKeysIn, // From the 5.0.0 version
  isObjectSomeKeys, // From the 5.0.0 version
  isParam,
  isPrimitive,
  isRegExp, // From the 4.2.0 version.
  isString,
  isStringIncludes, // From the 5.0.0 version
  isStringIncludesSome, // From the 5.0.0 version
  isStringLength, // From the 4.2.0 version.
  isStringLengthBetween, // From the 5.0.0 version
  isStringObject,
  isStringType,
  isSymbol,
  isTrue, // From the 4.2.0 version.
  isType,
  isUndefined,
} from '@angular-package/type';

isNot

// `isNot` prefix functions.
import {
  isNotBoolean,
  isNotDefined,
  isNotFunction,
  isNotNull,
  isNotNumber,
  isNotString,
  isNotUndefined
} from '@angular-package/type';

are

// `are` prefix functions.
import {
  // Function.
  areBigInt, // From the `5.0.0` version
  areBoolean, // From the `5.0.0` version
  areDate, // From the `5.0.0` version
  areDefined, // From the `5.0.0` version
  areFalse, // From the `5.0.0` version
  areNull, // From the `5.0.0` version
  areNumber, // From the `5.0.0` version
  areRegExp, // From the `5.0.0` version
  areString,
  areSymbol, // From the `5.0.0` version
  areTrue, // From the `5.0.0` version
  areUndefined, // From the `5.0.0` version
} from '@angular-package/type';

guard

Functions with the prefix guard constraint the type and determine the value is of the specified type.

// `guard` prefix functions.
import { 
  guardArray,
  guardBigInt,
  guardBoolean,
  guardClass,
  guardDate, // From the 5.0.0 version
  guardDefined,
  guardFalse, // From the 5.0.0 version
  guardFunction,
  guardInstance,
  guardKey,
  guardNull,
  guardNumber,
  guardNumberBetween, // From the 5.0.0 version
  guardObject,
  guardObjectKey,
  guardObjectKeyIn, // From the 5.0.0 version
  guardObjectKeys,
  guardObjectSomeKeys, // From the 5.0.0 version
  guardPrimitive,
  guardRegExp, // From the 5.0.0 version
  guardString,
  guardStringLength, // From the 5.0.0 version
  guardStringLengthBetween, // From the 5.0.0 version
  guardStringIncludes, // From the 5.0.0 version
  guardStringIncludesSome, // From the 5.0.0 version
  guardSymbol,
  guardTrue, // From the 5.0.0 version
  guardType,
  guardUndefined,
} from '@angular-package/type'; 

Object

The objects represent the check and guard functions.

// Objects.
import {
  are,
  guard,
  is,
  isNot,
  type
} from '@angular-package/type';

Interface

// Interfaces.
import {
  MinMax
} from '@angular-package/type';

Type

// Types.
import {
  AnyBoolean,
  AnyNumber,
  AnyString,
  CallbackPayload, // From the `5.0.0` version.
  Constructor,
  Defined,
  ForEachCallback,  // From the `5.0.0` version.
  GenericObject, // From the `5.0.0` version.
  Never,
  NotUndefined,
  NumberBetween, // From the `4.2.0` version.
  Primitive,
  Primitives,
  ResultCallback, // From the `4.2.0` version
  StringOfLength, // From the `4.2.0` version.`
  Type,
  Types,
  Undefined
} from '@angular-package/type';

Functions with the prefix is determine whether the value of type is of the specified type.

Functions with the prefix isNot determine whether the value of type is not of a specified type.

Functions with the prefix are determine whether the values of type are of the specified type.

any
any
any
Logotype/public-api.ts at main · angular-package/typeGitHub