types

Advanced type checking and validation utilities.

Functions

Function
Description
Example

of

Get the type of a value

dphelper.types.of(value)

instOfObj

Check if value is Object instance

dphelper.types.instOfObj(value)

isNaN

Check if value is NaN

dphelper.types.isNaN(value)

isBool

Check if value is boolean

dphelper.types.isBool(value)

Description

Advanced type utilities:

  • Type Detection - Get precise type of any value

  • Boolean Check - Detect boolean values (including string booleans)

  • Object Check - Verify object instances

Usage Examples

Get Type

// Get type of value
console.log(dphelper.types.of('hello'));     // "string"
console.log(dphelper.types.of(123));        // "number"
console.log(dphelper.types.of(true));       // "boolean"
console.log(dphelper.types.of({}));         // "object"
console.log(dphelper.types.of([]));         // "object"
console.log(dphelper.types.of(null));       // "null"
console.log(dphelper.types.of(undefined));  // "undefined"

Check Object Instance

Check NaN

Check Boolean

Form Validation

Details

  • Author: Dario Passariello

  • Version: 0.0.2

  • Creation Date: 20210101

  • Last Modified: 20260220

  • Environment: both (browser + Node.js)


Automatically generated document

Last updated