![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
underscore
文章平均质量分 72
乔心小白菜
出来混,迟早要还的。该还不还,还要还
展开
-
V-1.8.2 underscore源码解析(一)
V-1.8.2 underscore源码解析(一)原创 2017-12-15 15:35:43 · 279 阅读 · 0 评论 -
V-1.8.2 underscore源码解析(二)
V-1.8.2 underscore源码解析(二) if(typeof exports !== "undefined") { if(typeof module !== "undefined" && module.exports) { exports = module.exports = _; } exports._ = _;原创 2017-12-25 09:59:20 · 179 阅读 · 0 评论 -
V-1.8.2 underscore源码解析(三)
V-1.8.2 underscore源码解析(三)// each的实现类似于forEach // 遍历数组或对象的每个元素。第一个参数为数组(类数组)或对象 // 第二个参数为迭代方法,对数组或对象每个元素执行该方法, // 第三个参数(可省略)来决定iteratee的this指向 _.each = _.forEach = function(obj, iteratee, context)原创 2017-12-25 13:12:59 · 240 阅读 · 0 评论 -
V-1.8.2 underscore源码解析(四)
V-1.8.2 underscore源码解析(四)// Return the minimum element (or element-based computation)._.min = function(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity,原创 2017-12-25 16:02:53 · 214 阅读 · 0 评论 -
V-1.8.2 underscore源码解析(五)
V-1.8.2 underscore源码解析(五) _.countBy = group(function(result, value, key) { if(_.has(result, key)) result[key]++; else result[key] = 1; }); // _.countBy([1, 2, 3, 4, 5], functi原创 2018-01-12 17:39:57 · 42455 阅读 · 0 评论