
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 · 180 阅读 · 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 · 1147 阅读 · 0 评论