Functions

f
assertarray(x: unknown): asserts x is array

Asserts that a value is a 1D array.

f
assertdimension(dim: unknown): asserts dim is Dimension

Asserts that a value is a valid dimension (0 or 1).

f
assertmatrix(x: unknown): asserts x is matrix

Asserts that a value is a 2D matrix.

f
assertnormalizationflag(flag: unknown): asserts flag is NormalizationFlag

Asserts that a value is a valid normalization flag (0 or 1).

f
assertnumber(x: unknown): asserts x is number

Asserts that a value is a number.

f
clock(): array

Retrieves the current date and time as a date vector.

f
datenum(
d: string | array<string | number>,
fmt?: string
): number | array

Convert date and time to a serial date number (Unix).

f
isarray(x: unknown): x is array<any>

Checks if the input is a 1D array.

f
isempty(x: unknown): boolean

Checks if an array or matrix is empty.

f
isfunction(x: unknown): boolean

Checks if the input is a function.

f
isinteger(x: unknown): boolean

Checks if the input is an integer.

f
islogical(x: unknown): x is boolean

Checks if the input is a boolean.

f
ismatrix(x: unknown): x is matrix

True for matrix (2D array with consistent row lengths).

f
isnull(x: unknown): boolean

True for null values.

f
isscalar(x: unknown): boolean

Checks if the input is a scalar value.

f
issingular(x: unknown): boolean

Checks if a matrix is singular (non-invertible).

f
isstring(x: unknown): x is string

Checks if the input is a string.

f
isundefined(x: unknown): x is undefined

Checks if the input is undefined.

f
isvector(x: unknown): x is matrix

Checks if the input is a vector.

f
now(): number

Current date and time as a Unix timestamp.

f
randchar(
n?: number,
strset?: string
): string

Generates a random alphanumeric string.

f
strfind(
str: string,
pattern: string
): array

Finds all occurrences of a substring within a string.

f
today(): number

Gets the current date as a Unix timestamp.

f
weekday(x: number | array | matrix): number | array | matrix
3 overloads

Gets the ISO weekday for a given Unix timestamp.

Usage

import * as datatype__Data_type_checking__assertion__and_manipulation_functions___This_module_provides_utilities_for____Type_checking__isarray__ismatrix__isvector__etc_____Type_assertions__assertarray__assertmatrix__etc_____Array_vector_operations__arrayfun__vectorfun____Date_time_utilities__datenum__datestr__now__etc_____String_utilities__randchar__strfind_ from "datatype/index.ts";