nonsense less say directly on code
/** * is the method * * @export * @param {*} value * @returns {boolean} */Export function isfunction (Value:any): boolean {
return typeof value = = ' function '; /** * is undefined * * @export * @param {*} [value] * @returns {boolean}/Export function isundefined (value: A
NY): boolean {return typeof value = = ' undefined ';} /** * Whether to define * JS is not defined as undefined * so direct call isundefined * * @export * @param {*} [value] * @returns {Boolean}/Export
function isdefined (value: Any): boolean {return!isundefined (value);}
/** * is the string * * @export * @param {*} value * @returns {boolean}/Export function isstring (Value:any): boolean {
return typeof value = = = ' String '; /** * is the number * * @export * @param {*} value * @returns {boolean} */Export function Isnumber (Value:any): Boolean
{return typeof value = = ' number ';} /** * is a boolean type * * @export * @param {*} value * @returns {boolean} */Export function Isboolean (Value:any): Boolean {RETurn typeof value = = ' Boolean '; /** * is the time type * * @export * @param {*} value * @returns {boolean} */Export function isDate (Value:any): Boolean
{return value instanceof Date;} /** * is an object * Simple object cannot be method * @export * @param {*} value * @returns {boolean}/Export function IsObject (value:any)
: boolean {return value instanceof Object &&!isfunction (value);}
/** * is an array * * @export * @param {*} value * @returns {boolean} */Export function IsArray (Value:any): boolean {
return value instanceof Array;
/** * is null * * @export * @param {*} value * @returns {boolean}/Export function IsEmpty (Value:any): boolean { return!value | | Value.length = = 0 | |
IsObject (value) && Object.keys (value). length = = 0; }
Where you need to use it.
Import {IsEmpty} from ' ... /.. /service/core/typings ';
And then
Console.error (IsEmpty (' Fat Flying Cat '))//False