diff --git a/angular-lodash.js b/angular-lodash.js index d090d6d..7311406 100644 --- a/angular-lodash.js +++ b/angular-lodash.js @@ -86,58 +86,67 @@ // begin register ropooy-angular-lodash/filters - var adapList = [ + var filterList = [ + // Arrays + 'compact', + 'difference', + ['rest', 'drop', 'tail'], + ['first', 'head', 'take'], + 'flatten', + 'indexOf', + 'initial', + 'intersection', + 'last', + 'lastIndexOf', + ['zipObject', 'object'], + 'sortedIndex', + 'union', + ['uniq', 'unique'], + ['zip', 'unzip'], + 'without', + 'xor', + + //Chaining, had 'tap', but it is removed now. + + //Collections, had 'reduce'/'reduceRight'+aliases but those are removed now. + 'at', ['map', 'collect'], - ['reduce', 'inject', 'foldl'], - ['reduceRight', 'foldr'], - ['find', 'detect'], + 'countBy', + ['find', 'detect', 'findWhere'], ['filter', 'select'], - 'where', - 'findWhere', - 'reject', + 'findLast', + 'groupBy', 'invoke', - 'pluck', 'max', 'min', - 'sortBy', - 'groupBy', - 'countBy', + 'pluck', + 'reject', 'shuffle', - 'toArray', - 'has', 'size', - ['first', 'head', 'take'], - 'initial', - 'last', - ['rest', 'tail', 'drop'], - 'compact', - 'flatten', - 'without', - 'union', - 'intersection', - 'difference', - ['uniq', 'unique'], - 'zip', - 'object', - 'indexOf', - 'lastIndexOf', - 'sortedIndex', + 'sortBy', + 'toArray', + 'where', + + //Functions, none + + //Objects + ['functions', 'methods'], + 'invert', 'keys', - 'values', + 'omit', 'pairs', - 'invert', - ['functions', 'methods'], 'pick', - 'omit', - 'tap', - 'identity', - 'uniqueId', + 'values', + + //Utilities, 'template' has been removed. 'escape', + 'identity', 'result', - 'template' + 'unescape', + 'uniqueId' ]; - _.each(adapList, function(filterNames) { + _.each(filterList, function(filterNames) { if(!(_.isArray(filterNames))) { filterNames = [filterNames]; } diff --git a/test/filterSpec.js b/test/filterSpec.js index d136e53..e84c09c 100644 --- a/test/filterSpec.js +++ b/test/filterSpec.js @@ -15,8 +15,6 @@ describe('ropooy-angular-lodash: Filter', function() { var simpleAdapList = [ 'map', 'collect', - 'reduce', 'inject', 'foldl', - 'reduceRight', 'foldr', 'find', 'detect', 'invoke', 'pluck', @@ -42,12 +40,9 @@ describe('ropooy-angular-lodash: Filter', function() { 'values', 'functions', 'methods', 'pick', - 'tap', - 'has', 'uniqueId', 'escape', - 'result', - 'template' + 'result' ]; var $filter;