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.
| Argument | Description |
|---|---|
| val | The value to inspect |
Returns: A string representation of the type of the value
isInteger(val)
Checks whether a given value is an Integer.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is an Integer, false otherwise.
isNumber(val)
Checks whether a given value is a Number.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is a Number, false otherwise.
isBool(val)
Checks whether a given value is a Bool.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is a Bool, false otherwise.
isNull(val)
Checks whether a given value is null.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is null, false otherwise.
isString(val)
Checks whether a given value is a String.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is a String, false otherwise.
isObject(val)
Checks whether a given value is an Object.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is an Object, false otherwise.
isClosure(val)
Checks whether a given value is a Function.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is a Function, false otherwise.
isProgram(val)
Checks whether a given value is a Program.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is a Program, false otherwise.
isArray(val)
Checks whether a given value is an Array.
| Argument | Description |
|---|---|
| val | The value to check |
Returns: true if val is an Array, false otherwise.