Home > @infiniteobjects/core-library > Assert
Utilities for asserting primitives, unique identifiers and strings
Signature:
export declare class Assert
| Method | Modifiers | Description |
|---|---|---|
| isAddress(value) | static |
Checks if the given value is a valid Address string using basic regex. Does not validate address checksums. |
| isAggregateError(value) | static |
Check if the given value is an AggregateError |
| isArray(val) | static |
Checks if the given input is an Array |
| isBoolean(x) | static |
Checks if the given input is a Boolean |
| isDate(x) | static |
Checks if the given input is a Date |
| isEmail(value, options) | static |
Check if the given value is a valid Email address string. |
| isEmptyArray(array) | static |
Returns true if the given Array is empty |
| isEmptyObject(obj) | static |
Returns true if the given input is an empty object |
| isEnumeration(value, enumeration) | static |
Check if the given value is an Enumeration value |
| isError(value) | static |
Check if the given value is an error |
| isEthereumAddress(value) | static |
Checks if the given value is a valid Ethereum Address string using basic regex. Does not validate address checksums. |
| isFlowAddress(value) | static |
Checks if the given input is a valid Flow Address string using basic regex. Does not validate address checksums. |
| isFunction(fn) | static |
Checks if the given input is a function |
| isJWT(value) | static |
Check if the given value is a valid JWT token string. |
| isMimeType(value) | static |
Check if the given value is a valid Mime Type string |
| isNumber(x) | static |
Checks if the given input is an a number |
| isNumericId(value) | static |
Checks if the given value is a valid numericID string. Uses the last digit as a check digit |
| isObject(obj) | static |
Checks if the given input is Object Like, You can use Generic types to assert an specific Type |
| isString(x) | static |
Checks if the given input is an a string |
| isURL(value, options) | static |
Check if the given value is a valid URL string. |
| isUUIDv4(value) | static |
Check if the given input is a valid UUID V4 string |
| isValidationError(value) | static |
Check if the given value is a ValidationError |
| notNill(value) | static |
Returns true if value is not null or undefined |
| notNull(value) | static |
Returns true if value is not null |
| notUndefined(value) | static |
Returns true if value is not undefined |