add more helper func for debugging

This commit is contained in:
fyears 2022-03-14 23:25:01 +08:00
parent 70ad37d6d6
commit 1699d39f62

View File

@ -268,3 +268,12 @@ export const getSplitRanges = (bytesTotal: number, bytesEachPart: number) => {
} }
return res; return res;
}; };
/**
* https://stackoverflow.com/questions/332422
* @param obj anything
* @returns string of the name of the object
*/
export const getTypeName = (obj: any) => {
return Object.prototype.toString.call(obj).slice(8, -1);
};