_.mixin = function(obj) { _.each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return chainResult(this, func.apply(_, args)); }; }); return _; };
javascript這個函數(shù)寫的怎么樣,用到了哪些技巧?
尚方寶劍之說
2018-07-31 13:13:28