export default class Tools {
/** * Check whether the object has key *@param obj
* @param key
*/
objectHasKey(obj: object, key: string | number | symbol) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
/** * get values * of the object@param * / object obj
objToArray(obj: object) {
const values = [];
for (const value of Object.values(obj)) {
values.push(value)
}
returnvalues; }}Copy the code