From 3442dd13c002369a12b98d27f92f6cb603b737ad Mon Sep 17 00:00:00 2001 From: David Hollifield Date: Fri, 19 Feb 2016 17:16:49 -0500 Subject: [PATCH 1/2] lodash 4.x updates --- angular-lodash.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/angular-lodash.js b/angular-lodash.js index c1e767e..c754d7a 100644 --- a/angular-lodash.js +++ b/angular-lodash.js @@ -35,7 +35,7 @@ // Shiv "filter", "reject" to angular's built-in, // and reserve lodash's feature(works on obj). ng.injector(['ng']).invoke(['$filter', function($filter) { - _.filter = _.select = _.wrap($filter('filter'), function(filter, obj, exp) { + _.filter = _.wrap($filter('filter'), function(filter, obj, exp) { if(!(_.isArray(obj))) { obj = _.toArray(obj); } @@ -60,7 +60,7 @@ // begin register angular-lodash/utils - _.each(_.methods(_), function(methodName) { + _.each(_.functions(_), function(methodName) { function register($rootScope) {$rootScope[methodName] = _.bind(_[methodName], _);} _.each([ @@ -84,11 +84,8 @@ ['reduceRight', 'foldr'], ['find', 'detect'], ['filter', 'select'], - 'where', - 'findWhere', 'reject', 'invoke', - 'pluck', 'max', 'min', 'sortBy', @@ -100,14 +97,14 @@ ['first', 'head', 'take'], 'initial', 'last', - ['rest', 'tail', 'drop'], + ['tail', 'drop'], 'compact', 'flatten', 'without', 'union', 'intersection', 'difference', - ['uniq', 'unique'], + 'unique', 'zip', 'object', 'indexOf', @@ -115,7 +112,7 @@ 'sortedIndex', 'keys', 'values', - 'pairs', + 'toPairs', 'invert', ['functions', 'methods'], 'pick', From 5306915ff077948b0f54387710e155484b64e769 Mon Sep 17 00:00:00 2001 From: David Hollifield Date: Tue, 23 Feb 2016 18:11:30 -0500 Subject: [PATCH 2/2] Fixed renamed/missing 4.x alias --- angular-lodash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-lodash.js b/angular-lodash.js index c754d7a..26cfa83 100644 --- a/angular-lodash.js +++ b/angular-lodash.js @@ -104,9 +104,9 @@ 'union', 'intersection', 'difference', - 'unique', + 'uniq', 'zip', - 'object', + 'fromPairs', 'indexOf', 'lastIndexOf', 'sortedIndex',