Rename _.first to _.head, _.rest to _.tail, & _.restParam to _.rest.

This commit is contained in:
John-David Dalton
2015-10-14 17:55:01 -07:00
parent da993ee48d
commit e22cb5f3b3
4 changed files with 773 additions and 752 deletions

View File

@@ -32,7 +32,7 @@
return function(_) {
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
lodash.mixin(_ , { 'indexBy': lodash.keyBy });
lodash.mixin(_ , { 'indexBy': lodash.keyBy, 'rest': lodash.tail });
lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
};
}());

File diff suppressed because it is too large Load Diff

View File

@@ -342,16 +342,27 @@
'methods': 'functions',
'object': 'zipObject',
'pluck': 'map',
'restArgs': 'restParam',
'restParam': 'restArgs',
'select': 'filter',
'where': 'filter'
};
var keyMap = {
'rest': 'tail',
'restArgs': 'rest'
};
var lodash = _.noConflict();
return function(_) {
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
lodash.forOwn(keyMap, function(realName, otherName) {
_[otherName] = lodash[realName];
_.prototype[otherName] = lodash.prototype[realName];
});
lodash.forOwn(aliasToReal, function(realName, alias) {
_[alias] = _[realName];
_.prototype[alias] = _.prototype[realName];