mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Rename _.first to _.head, _.rest to _.tail, & _.restParam to _.rest.
This commit is contained in:
@@ -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(_))));
|
||||
};
|
||||
}());
|
||||
|
||||
1252
test/test.js
1252
test/test.js
File diff suppressed because it is too large
Load Diff
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user