![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
zwhfyy
无
展开
-
js实现applyIf
实现函数 applyIf(obj1, obj2) { if (typeof obj2 === 'object') { Object.keys(obj2).forEach((key) => { if (obj1[key] && ((typeof obj2[key] === 'object' && typeof obj1[key] === 'object') .原创 2021-03-27 09:59:30 · 145 阅读 · 0 评论 -
js格式化或者压缩
function format(txt, compress) { var indentChar = ' '; if (/^\s*$/.test(txt)) { console.log('数据为空,无法格式化! '); return; } try { var data = eval('(' + txt + ')'...转载 2019-10-22 17:36:32 · 1074 阅读 · 0 评论