@craftworks/js-utils
v1.2.8
Published
A JavaScript library that provides useful general-purpose functionalities.
Downloads
1,382
Readme
@craftworks/js-utils
A JavaScript library that provides useful general-purpose functionalities.
Installation
npm install --save @craftworks/js-utils
API
/**
* Checks if the given value is defined (not undefined or null).
*
* @template Type
* @param {Type | undefined | null} value - The value to be checked.
* @returns {boolean} Returns true if the value is defined, otherwise false.
*/
function isDefined<Type>(value: Type | undefined | null): value is Type;
/**
* Checks if the given value is a number.
* @param value - The value to be checked.
* @returns Returns true if the value is a number, otherwise false.
*/
function isNumber(value: unkown): value is number;
/**
* Checks if a value is a string
* @param value - The value to be checked.
* @returns Returns true if the value is a string, otherwise false.
*/
function isString(value: unkown): value is string;
Change Log
See CHANGELOG.md