types

This module provides functions to extract type-related information from values.

Functions

of(val)

Returns a string representation of the type of a value.

ArgumentDescription
valThe value to inspect

Returns: A string representation of the type of the value

isInteger(val)

Checks whether a given value is an Integer.

ArgumentDescription
valThe value to check

Returns: true if val is an Integer, false otherwise.

isNumber(val)

Checks whether a given value is a Number.

ArgumentDescription
valThe value to check

Returns: true if val is a Number, false otherwise.

isBool(val)

Checks whether a given value is a Bool.

ArgumentDescription
valThe value to check

Returns: true if val is a Bool, false otherwise.

isNull(val)

Checks whether a given value is null.

ArgumentDescription
valThe value to check

Returns: true if val is null, false otherwise.

isString(val)

Checks whether a given value is a String.

ArgumentDescription
valThe value to check

Returns: true if val is a String, false otherwise.

isObject(val)

Checks whether a given value is an Object.

ArgumentDescription
valThe value to check

Returns: true if val is an Object, false otherwise.

isClosure(val)

Checks whether a given value is a Function.

ArgumentDescription
valThe value to check

Returns: true if val is a Function, false otherwise.

isProgram(val)

Checks whether a given value is a Program.

ArgumentDescription
valThe value to check

Returns: true if val is a Program, false otherwise.

isArray(val)

Checks whether a given value is an Array.

ArgumentDescription
valThe value to check

Returns: true if val is an Array, false otherwise.