GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Type
  • Twitter
  • GitHub

This view

  • Original page
  • New address

GeezerVison is showing type.angular-package.dev — Introduction | Type

For the complete documentation index, see llms.txt. This page is also available as Markdown.

The type package's purpose is to determine the type of single or multiple values and guard single values. It also contains common types that can be useful for other packages.

Check & guard

The check means to determine the value of any type by using dedicated functions like 'isNaN()' , methods like 'isArray()', and operators 'typeof' 'instanceof'. The type package functions for checking the values are prefixed with 'are' 'is' 'isNot' word.

The guard means the same as a check but with an additional constrain type, and guard functions are prefixed with the 'guard' word.

Single and multiple

The difference between prefixed with 'is' and 'are' functions is, prefixed with 'is' are used to check a single value of any type, prefixed with 'are' are used for checking multiple values of any type against one type. Additionally, checking multiple values is determined by every(), forEach() or some() methods.

Precise

To make the functions more precise, besides the use of 'typeof' and 'instanceof' operators, some of them use method 'toString()' of the two objects 'Function' and 'Object' to detect the type.

Result handler & payload

Each function includes an optional callback function to handle the check result and an optional payload. The payload parameter of the callback function contains additional useful properties specific to the function and can be extended by the payload parameter of the core function.

Next❤ Benefits

Last updated 4 years ago

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.