UNPKG

wcm-rest-api

Version:

A Javascript library to work with WCM REST API operations

24 lines (21 loc) 579 B
import rfdc from 'rfdc'; export class Utils { /** * @method cloneObject * @param {object} entryObject * @param {boolean} deepClone * @summary this functions allows you to have new object instance * @return {object} **/ static cloneObject(entryObject, deepClone = false) { if (deepClone) return rfdc()(entryObject); return Object.assign({}, entryObject); }; /** * @method isEmpty * @param {object} object */ static isEmpty(object) { return !!object && !Object.keys(object).length; } }