标签:private pre ret obj turn form object undefined def
/** * 对象转换成一个新的对象 * @param object * @private */ function _yh_tranformObject(object){ if(object == null || object == undefined || object == ‘‘) return object; const newObject = {}; for(const o in object){ if( typeof(object[o])=="object" ){ newObject[o] = _yh_tranformObject(object[o]); }else{ newObject[o] = object[o]; } } return newObject ; }
标签:private pre ret obj turn form object undefined def
原文地址:http://www.cnblogs.com/hwaggLee/p/7856331.html