摘要:
// 为Promise添加finally方法支持 Promise.prototype.finally = function (callback) { let P = this.constructor; return this.then( value => P.resolve(callback()). 阅读全文
摘要:
//取数组交集 doIntersection(firstArray, secondArray) { // The logic here is to create a hashmap with the elements of the firstArray as the keys. // After t 阅读全文
摘要:
// 去除数组里面为空的属性及子数组 export function deepCopy (source) { var result = [] //var result = {} for (var key in source) { if (source[key] instanceof Array) { 阅读全文