{"id":13463651,"url":"https://github.com/a8m/angular-filter","last_synced_at":"2025-05-14T04:10:16.565Z","repository":{"id":18389307,"uuid":"21570384","full_name":"a8m/angular-filter","owner":"a8m","description":" Bunch of useful filters for AngularJS (with no external dependencies!)","archived":false,"fork":false,"pushed_at":"2017-12-11T08:44:08.000Z","size":829,"stargazers_count":2920,"open_issues_count":109,"forks_count":331,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-05-12T01:59:27.307Z","etag":null,"topics":["angular","angular-filters","filter","ng-pipes"],"latest_commit_sha":null,"homepage":"https://github.com/a8m/angular-filter","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a8m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T12:51:49.000Z","updated_at":"2025-04-29T20:52:16.000Z","dependencies_parsed_at":"2022-08-28T15:32:06.208Z","dependency_job_id":null,"html_url":"https://github.com/a8m/angular-filter","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Fangular-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Fangular-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Fangular-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a8m%2Fangular-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a8m","download_url":"https://codeload.github.com/a8m/angular-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254070111,"owners_count":22009559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-filters","filter","ng-pipes"],"created_at":"2024-07-31T14:00:25.462Z","updated_at":"2025-05-14T04:10:11.548Z","avatar_url":"https://github.com/a8m.png","language":"JavaScript","readme":"# Angular-filter \u0026nbsp; [![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url] [![License][license-image]][license-url]\nBunch of useful filters for AngularJS *(with no external dependencies!)*\n\n\u003ch3 align=\"center\"\u003e\n\u003cimg src=\"https://angular.io/assets/images/logos/angular/angular.svg\" width=\"50\" alt=\"angular pipes\"\u003e\u003cbr/\u003e\n Angular 2 version is now available: \u003ca href=\"https://github.com/a8m/ng-pipes\"\u003eng-pipes\u003c/a\u003e\n \u003c/h3\u003e\n\n## Table of contents:\n- [![Gitter][gitter-image]][gitter-url]\n- [Get Started](#get-started)\n- [Common Questions](https://github.com/a8m/angular-filter/wiki/Common-Questions)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n- [TODO](#todo)\n- [Collection](#collection)\n  - [after](#after)\n  - [afterWhere](#afterwhere)\n  - [before](#before)\n  - [beforeWhere](#beforewhere)\n  - [concat](#concat)\n  - [contains](#contains)\n  - [countBy](#countby)\n  - [chunkBy](#chunkby)\n  - [defaults](#defaults)\n  - [every](#every)\n  - [filterBy](#filterby)\n  - [first](#first)\n  - [flatten](#flatten)\n  - [fuzzy](#fuzzy)\n  - [fuzzyBy](#fuzzyby)\n  - [groupBy](#groupby)\n  - [isEmpty](#isempty)\n  - [join](#join)\n  - [last](#last)\n  - [map](#map)\n  - [omit](#omit)\n  - [pick](#pick)\n  - [pluck](#pluck)\n  - [range](#range)\n  - [reverse](#reverse)\n  - [remove](#remove)\n  - [removeWith](#removewith)\n  - [searchField](#searchfield)\n  - [some](#contains)\n  - [toArray](#toarray)\n  - [unique](#unique)\n  - [where](#where)\n  - [xor](#xor)\n- [String](#string)\n  - [endsWith](#endswith)\n  - [latinize](#latinize)\n  - [repeat](#repeat)\n  - [reverse](#reverse-1)\n  - [slugify](#slugify)\n  - [split](#split)\n  - [startsWith](#startswith)\n  - [stripTags](#striptags)\n  - [stringular](#stringular)\n  - [match](#match)\n  - [phoneUS](#phoneus)\n  - [test](#test)\n  - [trim](#trim)\n  - [ltrim](#ltrim)\n  - [rtrim](#rtrim)\n  - [truncate](#truncate)\n  - [ucfirst](#ucfirst)\n  - [uriEncode](#uriencode)\n  - [uriComponentEncode](#uricomponentencode)\n  - [wrap](#wrap)\n- [Math](#math)\n  - [min](#min)\n  - [max](#max)\n  - [abs](#abs)\n  - [percent](#percent)\n  - [radix](#radix)\n  - [sum](#sum)\n  - [degrees](#degrees)\n  - [radians](#radians)\n  - [shortFmt](#shortfmt)\n  - [byteFmt](#bytefmt)\n  - [kbFmt](#kbfmt)\n- [Boolean](#boolean)\n  - [isNull](#isnull)\n  - [isDefined](#isdefined)\n  - [isUndefined](#isundefined)\n  - [isString](#isstring)\n  - [isNumber](#isnumber)\n  - [isObject](#isobject)\n  - [isArray](#isarray)\n  - [isFunction](#isfunction)\n  - [isEqual](#isequal)\n  - [isGreaterThan](#isgreaterthan) `\u003e`\n  - [isGreaterThanOrEqualTo](#isgreaterthanorequalto) `\u003e=`\n  - [isLessThan](#islessthan) `\u003c`\n  - [isLessThanOrEqualTo](#islessthanorequalto) `\u003c=`\n  - [isEqualTo](#isequalto) `==`\n  - [isNotEqualTo](#isnotequalto) `!=`\n  - [isIdenticalTo](#isidenticalto) `===`\n  - [isNotIdenticalTo](#isnotidenticalto) `!==`\n\n## Get Started\n**(1)** You can install angular-filter using 4 different methods:\n  - clone \u0026 [build](#Contributing) this repository\n  - via **[Bower](http://bower.io/)**: by running `$ bower install angular-filter` from your terminal\n  - via **[npm](https://www.npmjs.org/)**: by running `$ npm install angular-filter` from your terminal\n  - via cdnjs http://www.cdnjs.com/libraries/angular-filter\n\n**(2)** Include `angular-filter.js` (or `angular-filter.min.js`) in your `index.html`, after including Angular itself.\n\n**(3)** Add `'angular.filter'` to your main module's list of dependencies.\n\nWhen you're done, your setup should look similar to the following:\n\n```html\n\u003c!doctype html\u003e\n\u003chtml ng-app=\"myApp\"\u003e\n\u003chead\u003e\n\n\u003c/head\u003e\n\u003cbody\u003e\n    ...\n    \u003cscript src=\"//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.0/angular.min.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/angular-filter/dist/angular-filter.min.js\"\u003e\u003c/script\u003e\n    ...\n    \u003cscript\u003e\n        var myApp = angular.module('myApp', ['angular.filter']);\n\n    \u003c/script\u003e\n    ...\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Collection\n\n### concat\n\nConcatenates an array/object into another one.\n\n\n```js\nfunction MainController ($scope) {\n  $scope.array = [ {a: 1}, {a: 2} ];\n  $scope.object = {\n    0: {a: 3},\n    1: {a: 4}\n  };\n}\n```\n\n```html\n\u003cli ng-repeat=\"elm in array | concat:object\"\u003e\n  {{ elm.a }}\n\u003c/li\u003e\n\n\u003c!--\nresult:\n1 2 3 4\n--\u003e\n\n\u003cli ng-repeat=\"elm in object | concat:array\"\u003e\n  {{ elm.a }}\n\u003c/li\u003e\n\n\u003c!--\nresult:\n3 4 1 2\n--\u003e\n```\n\n### unique\nRemove duplicates from an array/object.\u003cbr/\u003e\nIf a string is provided, it will filter out duplicates using the provided expression.\u003cbr/\u003e\n**Usage:** ```collection | unique: 'property' ```\u003cbr/\u003e\n**aliases:** uniq\n```js\nfunction MainController ($scope) {\n  $scope.orders = [\n    { id:1, customer: { name: 'John', id: 10 } },\n    { id:2, customer: { name: 'William', id: 20 } },\n    { id:3, customer: { name: 'John', id: 10 } },\n    { id:4, customer: { name: 'William', id: 20 } },\n    { id:5, customer: { name: 'Clive', id: 30 } }\n  ];\n}\n```\nEx: Filter by customer.id\n```html\n\u003cth\u003eCustomer list:\u003c/th\u003e\n\u003ctr ng-repeat=\"order in orders | unique: 'customer.id'\" \u003e\n   \u003ctd\u003e {{ order.customer.name }} , {{ order.customer.id }} \u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c!-- result:\nAll customers list:\nJohn 10\nWilliam 20\nClive 30\n\n```\n### filterBy\nFilter a collection by a specific property.\u003cbr/\u003e\n**Usage:** ```collection | filterBy: [prop, nested.prop, etc..]: search: strict[optional]```\u003cbr/\u003e\n**Note:** You can even use compound properties (e.g: ```|filterBy: [property + property]: model```)\u003cbr/\u003e\n\n```js\n$scope.users = [\n  { id: 1, user: { first_name: 'Rob', last_name: 'John',  mobile: 4444 } },\n  { id: 2, user: { first_name: 'John', last_name: 'Wayne',  mobile: 3333 } },\n  { id: 3, user: { first_name: 'Rob', last_name: 'Johansson',  mobile: 2222 } },\n  { id: 4, user: { first_name: 'Mike', last_name: 'Terry',  mobile: 1111 } }\n];\n```\nReturn users whose id is 1\n```html\n\u003c!--search only by id --\u003e\n\u003cth ng-repeat=\"user in users | filterBy: ['id']: 1\"\u003e\n  {{ user.id }} : {{ user.first_name }} {{ user.last_name }}\n\u003c/th\u003e\n\u003c!--result:\n  1: Rob John\n--\u003e\n\n```\nReturn users whose first name or last name is 'John' (uses nested properties).\n```html\n\u003c!--search by first_name and last_name --\u003e\n\u003cth ng-repeat=\"user in users | filterBy: ['user.first_name', 'user.last_name']: 'John'\"\u003e\n  {{ user.first_name }} {{ user.last_name }}\n\u003c/th\u003e\n\u003c!--result:\n  1: Rob John\n  2: John Wayne\n--\u003e\n\n```\nReturn users whose full name is\n```html\n\u003c!--search by full name --\u003e\n\u003cth ng-repeat=\"user in users | filterBy: ['user.first_name + user.last_name']: 'Rob Joh'\"\u003e\n  {{ user.id }}: {{ user.first_name }} {{ user.last_name }}\n\u003c/th\u003e\n\u003c!--result:\n  1: Rob John\n  3: Rob Johannson\n--\u003e\n```\n### first\nGets the first element(s) of a collection.\u003cbr/\u003e\nIf an expression is provided, it will only return elements whose expression is truthy.\u003cbr/\u003e\n***Usage:*** See below \u003cbr/\u003e\n\n```js\n$scope.users = [\n  { id: 1, name: { first: 'John', last: 'Wayne' } },\n  { id: 2, name: { first: 'Mike', last: 'Johannson' } },\n  { id: 3, name: { first: 'William', last: 'Kyle' } },\n  { id: 4, name: { first: 'Rob', last: 'Thomas' } }\n];\n```\nReturns the first user.\n```html\n{{ users | first }}\n\u003c!--result:\n{ id: 1, name: { first: 'John', last: 'Wayne' } }\n--\u003e\n\n```\nReturns the first user whose first name is 'Rob' and last name is 'Thomas'\n```html\n\u003c!-- collection | first: expression --\u003e\n{{ users | first: 'name.first === \\'Rob\\' \u0026\u0026 name.last === \\'Thomas\\'' }}\n\u003c!--result:\n[ { id: 4, name: { first: 'Rob', last: 'Thomas' } } ]\n--\u003e\n\n```\nReturn the first two users\n```html\n\u003c!-- collection | first: n --\u003e\n\u003cth ng-repeat=\"user in users | first: 2\"\u003e\n  {{ user.name.first }}\n\u003c/th\u003e\n\u003c!--result:\nJohn\nMike\n--\u003e\n\n```\nReturn the first two users with even id\n```html\n\u003c!-- collection | first: n: expression --\u003e\n\u003cth ng-repeat=\"user in users | first: 2: '!(id%2)'\"\u003e\n  {{ user.name }}\n\u003c/th\u003e\n\u003c!--result:\nMike\nRob\n```\n### last\nGets the last element or last n elements of a collection,\u003cbr/\u003e\nif expression is provided, is returns as long the expression return truthy\u003cbr/\u003e\n***Usage:*** See below \u003cbr/\u003e\n```js\n$scope.users = [\n  { id: 1, name: { first: 'foo', last: 'bar' } },\n  { id: 2, name: { first: 'baz', last: 'bar' } },\n  { id: 3, name: { first: 'bar', last: 'bar' } },\n  { id: 4, name: { first: 'lol', last: 'bar' } }\n];\n```\n```html\n{{ users | last }}\n\u003c!--result:\n{ id: 4, name: { first: 'lol', last: 'bar' } }\n```\n```html\n\u003c!-- collection | last: expression --\u003e\n{{ users | last: 'name.last === \\'bar\\'' }}\n\u003c!--result:\n[ { id: 4, name: { first: 'lol', last: 'bar' } } ]\n```\n```html\n\u003c!-- collection | last: n --\u003e\n\u003cth ng-repeat=\"user in users | last: 2\"\u003e\n  {{ user.name }}\n\u003c/th\u003e\n\u003c!--result:\nbar\nlol\n```\n```html\n\u003c!-- collection | last: n: expression --\u003e\n\u003cth ng-repeat=\"user in users | last: 2: '!(id%2)'\"\u003e\n  {{ user.name }}\n\u003c/th\u003e\n\u003c!--result:\nbaz\nlol\n```\n### flatten\nFlattens a nested array (the nesting can be to any depth).\u003cbr/\u003e\nIf you pass shallow, the array will only be flattened a single level\u003cbr/\u003e\n**Usage:** ```collection | flatten: shallow[optional]```\n```js\n$scope.weirdArray = [[], 1, 2, 3, [4, 5, 6, [7, 8, 9, [10, 11, [12, [[[[[13], [[[[14, 15]]]]]]]]]]]]];\n```\n```html\n\u003cth ng-repeat=\"elm in wierdArray | flatten\"\u003e\n {{ elm }},\n\u003c/th\u003e\n\u003c!--result:\n1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15\n```\n\n### join\nJoins the contents of a collection into a string.\u003cbr/\u003e\nBy default, it will join elements with a *single space*, but you can provide your own delimiter.\n\n**Usage:** ```collection | join:', '```\n\nExample:\n\n```js\n$scope.names = ['John', 'Sebastian', 'Will', 'James'];\n```\n\n```html\n\u003cp\u003e{{ names | join:', ' }}\u003c/p\u003e\n\u003c!-- Will print \"John, Sebastian, Will, James\" --\u003e\n\n```\n\n\n### fuzzy\nfuzzy string searching(approximate string matching). [Read more](http://en.wikipedia.org/wiki/Approximate_string_matching)\u003cbr/\u003e\n**note:** use fuzzyBy to filter by one property to improve performance\u003cbr/\u003e\n**Usage:** ```collection | fuzzy: search: caseSensitive[optional]```\n```js\n$scope.books = [\n  { title: 'The DaVinci Code', author: 'F. Scott Fitzgerald' },\n  { title: 'The Great Gatsby', author: 'Dan Browns' },\n  { title: 'Angels \u0026 Demons',  author: 'Dan Louis' },\n  { title: 'The Lost Symbol',  author: 'David Maine' },\n  { title: 'Old Man\\'s War',   author: 'Rob Grant' }\n];\n```\n```html\n\u003cinput type=\"text\" ng-model=\"search\" placeholder=\"search book\" /\u003e\n\u003cli ng-repeat=\"book in books | fuzzy: search\"\u003e\n  {{ book.title }}\n\u003c/li\u003e\n\u003c!--case sensitive--\u003e\n\u003cli ng-repeat=\"book in books | fuzzy: search: true\"\u003e\n  {{ book.title }}\n\u003c/li\u003e\n```\n### fuzzyBy\nfuzzy string searching(approximate string matching) by property(nested to). [Read more](http://en.wikipedia.org/wiki/Approximate_string_matching)\u003cbr/\u003e\n**Usage:** ```collection | fuzzyBy: 'property': search: caseSensitive[optional]```\n```js\n$scope.books = [\n  { title: 'The DaVinci Code' },\n  { title: 'The Great Gatsby' },\n  { title: 'Angels \u0026 Demons'  },\n  { title: 'The Lost Symbol'  },\n  { title: 'Old Man\\'s War'   }\n];\n```\n```html\n\u003cinput type=\"text\" ng-model=\"search\" placeholder=\"search by title\" /\u003e\n\u003cli ng-repeat=\"book in books | fuzzyBy: 'title': search\"\u003e\n  {{ book.title }}\n\u003c/li\u003e\n\u003c!--case sensitive--\u003e\n\u003cli ng-repeat=\"book in books | fuzzyBy: 'title': search: true\"\u003e\n  {{ book.title }}\n\u003c/li\u003e\n```\n### groupBy\nCreate an object composed of keys generated from the result of running each element of a collection,\u003cbr/\u003e\neach key is an array of the elements.\u003cbr/\u003e\n**Usage:** ```(key, value) in collection | groupBy: 'property'``` or ```... | groupBy: 'nested.property'```\n```js\n$scope.players = [\n  {name: 'Gene', team: 'alpha'},\n  {name: 'George', team: 'beta'},\n  {name: 'Steve', team: 'gamma'},\n  {name: 'Paula', team: 'beta'},\n  {name: 'Scruath', team: 'gamma'}\n];\n```\n```html\n\u003cul\u003e\n  \u003cli ng-repeat=\"(key, value) in players | groupBy: 'team'\"\u003e\n    Group name: {{ key }}\n    \u003cul\u003e\n      \u003cli ng-repeat=\"player in value\"\u003e\n        player: {{ player.name }}\n      \u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\u003c!-- result:\n  Group name: alpha\n    * player: Gene\n  Group name: beta\n    * player: George\n    * player: Paula\n  Group name: gamma\n    * player: Steve\n    * player: Scruath\n```\n### countBy\nCreate an object composed of keys generated from the result of running each element of a collection,\u003cbr/\u003e\neach key is the count of objects in each group\u003cbr/\u003e\n**Usage:** ```(key, value) in collection | countBy: 'property'``` or ```... | countBy: 'nested.property'```\n```js\n$scope.players = [\n  {name: 'Gene', team: 'alpha'},\n  {name: 'George', team: 'beta'},\n  {name: 'Steve', team: 'gamma'},\n  {name: 'Paula', team: 'beta'},\n  {name: 'Scruath', team: 'gamma'}\n];\n```\n```html\n\u003cli ng-repeat=\"(key, value) in players | countBy: 'team'\" \u003e\n  Group name: {{ key }}, length: {{ value }}\n\u003c/li\u003e\n\u003c!-- result:\n  Group name: alpha, length: 1\n  Group name: beta, length: 2\n  Group name: gamma, length: 2\n```\n### chunkBy\nCollect data into fixed-length chunks or blocks\n**Usage:** ```(key, value) in collection | chunkBy: 'n': fill-value(optional)```\n```js\n$scope.array = [1, 2, 3, 4, 5, 6];\n```\n```html\n\u003cli ng-repeat=\"block in array | chunkBy: 2\" \u003e\n  Block: {{ block }}\n\u003c/li\u003e\n\u003c!-- result:\n  Block: [1, 2]\n  Block: [3, 4]\n  Block: [5, 6]\n--\u003e\n\u003c-- Example with fill value --\u003e\n\u003cli ng-repeat=\"block in array | chunkBy: 4: 0\" \u003e\n  Block: {{ block }}\n\u003c/li\u003e\n\u003c!-- result:\n  Block: [1, 2, 3, 4]\n  Block: [5, 6, 0, 0]\n```\n\n### defaults\n`defaultsFilter` allows to specify a default fallback value for properties that resolve to undefined.\u003cbr/\u003e\n**Usage:** `col in collection | defaults: fallback`\n```js\n$scope.orders = [\n      { id:1, destination: { zip: 21908 }, name: 'Ariel M' },\n      { id:2, name: 'John F' },\n      { id:3, destination: { zip: 45841 } },\n      { id:4, destination: { zip: 78612 }, name: 'Danno L' },\n  ];\n$scope.fallback = {\n      name: 'Customer name not available',\n      destination: { zip: 'Pickup' }\n  };\n```\n```html\n\u003cli ng-repeat=\"order in orders | defaults: fallback\"\u003e\n    \u003cb\u003eid:\u003c/b\u003e {{ order.id }},\n    \u003cb\u003ename:\u003c/b\u003e {{ order.name }},\n    \u003cb\u003eshipping address:\u003c/b\u003e {{ order.destination.zip }}\n\u003c/li\u003e\n\u003c!--Results:\n* id: 1, name: Ariel M, shipping address: 21908\n* id: 2, name: John F, shipping address: Pickup\n* id: 3, name: Customer name not available, shipping address: 45841\n* id: 4, name: Danno L, shipping address: 78612\n```\n**Note:** `defaultsFilter` change the source object.\u003cbr/\u003e\n**Why?** if we don't change the source object, it actually means we're gonna return a **new** object (copy operation) on **each digest cycle**.\u003cbr/\u003e\nAnd it will cause adverse memory and performance implications.\u003cbr/\u003e\n**How to avoid it?** see below\n```js\n//We copy it once, and it's really cheaper\n$scope.ordersWithFallback = angular.copy($scope.orders);\n```\n```html\n\u003cli ng-repeat=\"order in ordersWithFallback | defaults: fallback\"\u003e\n    \u003c!-- ..... --\u003e\n\u003c/li\u003e\n```\n### where\ncomparison for each element in a collection to the given properties object,\u003cbr/\u003e\nreturning an array of all elements that have equivalent property values.\n```js\n  $scope.collection = [\n    { id: 1, name: 'foo' },\n    { id: 1, name: 'bar' },\n    { id: 2, name: 'baz' }\n  ]\n```\n```html\n\u003ctr ng-repeat=\"obj in collection | where:{id: 1}\"\u003e\n  {{ obj.name }}\n\u003c/tr\u003e\n\u003c!-- result:\n  foo\n  bar\n--\u003e\n\n\u003ctr ng-repeat=\"obj in collection | where:{id: 1, name: 'foo'}\"\u003e\n  {{ obj.name }}\n\u003c/tr\u003e\n\u003c!-- result:\n  foo\n  --\u003e\n```\n### omit\nreturn collection without the omitted objects(by expression).\u003cbr/\u003e\nusage: ```collection | omit: expression```\u003cbr/\u003e\n**example 1:**\n```js\n$scope.mod2 = function(elm) {\n  return !(elm % 2);\n}\n```\n```html\n\u003ctr ng-repeat=\"num in [1,2,3,4,5,6] | omit: mod2\"\u003e\n  {{ num }},\n\u003c/tr\u003e\n\u003c!--result\n1, 3, 5\n```\n**example 2:**\n```js\n$scope.collection = [\n  { id: 1, user: { name: 'foo' } },\n  { id: 2, user: { name: 'bar' } },\n  { id: 3, user: { name: 'baz' } }\n]\n```\n```html\n\u003ctr ng-repeat=\"obj in collection | omit:'id \u003e 1 \u0026\u0026 user.name.indexOf(\\'b\\') !== -1'\"\u003e\n  id: {{ obj.id }}, name: {{ obj.user.name }}\n\u003c/tr\u003e\n\u003c!--result:\nid: 1, name: foo\n```\n### pick\nreturn collection composed of the picked objects(by expression).\u003cbr/\u003e\nusage: ```collection | pick: expression```\u003cbr/\u003e\n**example 1:**\n```js\n$scope.mod2 = function(elm) {\n  return !(elm % 2);\n}\n```\n```html\n\u003ctr ng-repeat=\"num in [1,2,3,4,5,6] | pick: mod2\"\u003e\n  {{ num }},\n\u003c/tr\u003e\n\u003c!--result\n2, 4, 6\n```\n**example 2:**\n```js\n$scope.collection = [\n  { id: 1, user: { name: 'foo' } },\n  { id: 2, user: { name: 'bar' } },\n  { id: 3, user: { name: 'baz' } }\n]\n```\n```html\n\u003ctr ng-repeat=\"obj in collection | pick:'id \u003e 1 \u0026\u0026 user.name.indexOf(\\'b\\') !== -1'\"\u003e\n  id: {{ obj.id }}, name: {{ obj.user.name }}\n\u003c/tr\u003e\n\u003c!--result:\nid: 2, name: bar\nid:3, name: baz\n```\n\n### remove\nReturns a new collection of removed elements.\n```js\n$scope.foo = { name: 'foo' };\n$scope.collection = [\n  { name: 'bar' },\n  $scope.foo,\n  null, 1\n];\n```\n```html\n\u003ctr ng-repeat=\"obj in collection | remove: foo: null: 1\"\u003e\n  {{ obj }}\n\u003c/tr\u003e\n\u003c!-- result:\n  { \"name\": \"bar\" }\n```\n### removeWith\ncomparison for each element in a collection to the given properties object,\u003cbr/\u003e\nreturning an array without all elements that have equivalent property values.\n```js\n  $scope.collection = [\n    { id: 1, name: 'foo' },\n    { id: 1, name: 'bar' },\n    { id: 2, name: 'baz' }\n  ]\n```\n```html\n\u003ctr ng-repeat=\"obj in collection | removeWith:{ id: 1 }\"\u003e\n  {{ obj.name }}\n\u003c/tr\u003e\n\u003c!-- result:\n  baz\n--\u003e\n\n\u003ctr ng-repeat=\"obj in collection | removeWith:{ id: 1, name: 'foo' }\"\u003e\n  {{ obj.name }}\n\u003c/tr\u003e\n\u003c!-- result:\n  bar\n  baz\n```\n### searchField\nif you want to use the filter in angular and want to filter for multiple values\u003cbr/\u003e\nso searchField filter return new collection with property called searchField\u003cbr/\u003e\n**support nested properties with dot notation i.e:** ``` collection | searchField: 'prop': 'nested.prop' ```\n```js\n$scope.users = [\n  { first_name: 'Sharon', last_name: 'Melendez' },\n  { first_name: 'Edmundo', last_name: 'Hepler' },\n  { first_name: 'Marsha', last_name: 'Letourneau' }\n];\n```\n```html\n\u003cinput ng-model=\"search\" placeholder=\"search by full name\"/\u003e\n\u003cth ng-repeat=\"user in users | searchField: 'first_name': 'last_name' | filter: search\"\u003e\n  {{ user.first_name }} {{ user.last_name }}\n\u003c/th\u003e\n\u003c!-- so now you can search by full name --\u003e\n```\n### after\nget a collection(array or object) and specified count, and returns all of the items\nin the collection after the specified count.\n```js\n$scope.collection = [\n    { name: 'foo' },\n    { name: 'bar' },\n    { name: 'baz' },\n    { name: 'zap' },\n  ];\n```\n```html\n\u003ctr ng-repeat=\"col in collection | after:2\"\u003e\n  {{ col.name }}\n\u003c/tr\u003e\n\u003c!--result:\n  baz\n  zap\n--\u003e\n\n```\n### afterWhere\nget a collection and properties object, and returns all of the items,\nin the collection after the first that found with the given properties, including it.\n```js\n$scope.orders = [\n  { id: 1, customer: { name: 'foo' }, date: 'Tue Jul 15 2014' },\n  { id: 2, customer: { name: 'foo' }, date: 'Tue Jul 16 2014' },\n  { id: 3, customer: { name: 'foo' }, date: 'Tue Jul 17 2014' },\n  { id: 4, customer: { name: 'foo' }, date: 'Tue Jul 18 2014' },\n  { id: 5, customer: { name: 'foo' }, date: 'Tue Jul 19 2014' }\n];\n```\n```html\n\u003ctr ng-repeat=\"order in orders | afterWhere:{ date: 'Tue Jul 17 2014' }\"\u003e\n  order: {{ order.id }}, {{ order.date }}\n\u003c/tr\u003e\n\u003c!--result:\n  order: 3, Tue Jul 17 2014\n  order: 4, Tue Jul 18 2014\n  order: 5, Tue Jul 19 2014\n--\u003e\n```\n\n### before\nget a collection(array or object) and specified count, and returns all of the items\nin the collection before the specified count.\n```js\n$scope.collection = [\n    { name: 'foo' },\n    { name: 'bar' },\n    { name: 'baz' },\n    { name: 'zap' },\n  ];\n```\n```html\n\u003ctr ng-repeat=\"col in collection | before:3\"\u003e\n  {{ col.name }}\n\u003c/tr\u003e\n\u003c!--result:\n  foo\n  bar\n--\u003e\n\n```\n\n### beforeWhere\nget a collection and properties object, and returns all of the items,\nin the collection before the first that found with the given properties, including it.\n```js\n$scope.orders = [\n  { id: 1, customer: { name: 'foo' }, date: 'Tue Jul 15 2014' },\n  { id: 2, customer: { name: 'foo' }, date: 'Tue Jul 16 2014' },\n  { id: 3, customer: { name: 'foo' }, date: 'Tue Jul 17 2014' },\n  { id: 4, customer: { name: 'foo' }, date: 'Tue Jul 18 2014' },\n  { id: 5, customer: { name: 'foo' }, date: 'Tue Jul 19 2014' }\n];\n```\n```html\n\u003ctr ng-repeat=\"order in orders | beforeWhere:{ date: 'Tue Jul 17 2014' }\"\u003e\n  order: {{ order.id }}, {{ order.date }}\n\u003c/tr\u003e\n\u003c!--result:\n  order: 1, Tue Jul 15 2014\n  order: 2, Tue Jul 16 2014\n  order: 3, Tue Jul 17 2014\n--\u003e\n```\n\n### reverse\nReverse the order of the elements in a collection\n\n```js\n$scope.users = [\n  { id: 1, name: 'bazzy' },\n  { id: 2, name: 'dazzy' },\n  { id: 3, name: 'lazzy' }\n];\n```\n```html\n\u003ctr ng-repeat=\"user in users | reverse\"\u003e\n  user: {{ user.id }}, {{ user.name }}\n\u003c/tr\u003e\n\u003c!--result:\n  user: 3, lazzy\n  user: 2, dazzy,\n  user: 1, bazzy\n--\u003e\n```\n\n### isEmpty\nget collection or string and return if it empty[Boolean]\n\n```html\n\u003ctr ng-repeat=\"order in orders\" ng-hide=\"orders | isEmpty\"\u003e\n\u003c!-- ..... --\u003e\n\u003c/tr\u003e\n\u003c!--some replacer msg--\u003e\n\u003ctr ng-show=\"orders | isEmpty\"\u003e\n  no content to show\n\u003c/tr\u003e\n```\n### contains\nChecks if given expression(or value) is present in one or more object in the collection\u003cbr/\u003e\n**Usage:** ```collection | contains: 'expression'```\u003cbr/\u003e\n**Aliases:** some\u003cbr/\u003e\nexample 1:\n```js\n$scope.array = [1,2,3,4];\n```\n```html\n\u003cth ng-show=\"{{ array | contains: 2 }}\"\u003e...\u003c/th\u003e\n```\nexample 2:\n```js\n$scope.collection = [\n  { user: { id: 1, name: 'foo' } },\n  { user: { id: 2, name: 'bar' } },\n  { user: { id: 3, name: 'baz' } }\n];\n```\n```html\n\u003cth ng-show=\"{{ collection | some: '!(user.id % 2) \u0026\u0026 user.name.indexOf(\\'b\\') === 0' }}\"\u003e...\u003c/th\u003e\n\u003c!--result: true\n```\n### every\nChecks if given expression(or value) return truthy value for all members of a collection\u003cbr/\u003e\n**Usage:** ```collection | every: 'expression'```\u003cbr/\u003e\nexample 1:\n```js\n$scope.array = [1,1,1,1];\n```\n```html\n\u003cth ng-show=\"{{ array | every: 1 }}\"\u003e...\u003c/th\u003e\n\u003c!--result: true\n```\nexample 2:\n```js\n$scope.collection = [\n  { user: { id: 4, name: 'foo' } },\n  { user: { id: 6, name: 'bar' } },\n  { user: { id: 8, name: 'baz' } }\n];\n```\n```html\n\u003cth ng-show=\"{{ collection | every: '!(user.id % 2)' }}\"\u003e...\u003c/th\u003e\n\u003c!--result: true\n```\n\n### xor\nExclusive or between two collections\u003cbr/\u003e\n**Usage:** ```collection1 | xor: collection2: expression[optional]```\u003cbr/\u003e\n\nExample1:\n```html\n\u003cp ng-repeat=\"elm in [1,2,3,4] | xor: [2,3,5]\"\u003e\n{{ elm }}\n\u003c/p\u003e\n\u003c!--result:\n1 4 5\n```\nExample2:\n```js\n$scope.users1 = [\n  { id: 0, details: { first_name: 'foo', last_name: 'bar' } },\n  { id: 1, details: { first_name: 'foo', last_name: 'baz' } },\n  { id: 2, details: { first_name: 'foo', last_name: 'bag' } }\n];\n$scope.users2 = [\n  { id: 3, details: { first_name: 'foo', last_name: 'bar' } },\n  { id: 4, details: { first_name: 'foo', last_name: 'baz' } }\n];\n```\n```html\n\u003cth ng-repeat=\"user in users1 | xor: users2\"\u003e\n  {{ user.id }}\n\u003c/th\u003e\n\u003c!--result:\n1 2 3 4 5\n--\u003e\n\u003cth ng-repeat=\"user in users1 | xor: users2: 'details.last_name'\"\u003e\n  {{ user.id }}, {{ user.details.first_name }} {{ user.details.last_name }}\n\u003c/th\u003e\n\u003c!--result:\n2, foo bag\n```\n### toArray\nConvert objects into stable arrays. \u003cbr/\u003e\n**Usage:** ```object | toArray: addKey[optional]```\u003cbr/\u003e\nif addKey set to true, the filter also attaches a new property $key to the value containing the original key that was used in the object we are iterating over to reference the property\n```html\n\u003cth ng-repeat=\"elm in object | toArray | orderBy: 'property'\"\u003e\n  {{ elm.name }}\n\u003c/th\u003e\n```\n### map\nReturns a new collection of the results of each expression execution. \u003cbr/\u003e\n**Usage:** ```collection | map: expression``` \u003cbr/\u003e\nExample1:\n```js\n$scope.divide = function(elm) {\n  return elm/2\n}\n```\n```html\n\u003cth ng-repeat=\"i in [1, 2, 3, 4, 5] | map: divide\"\u003e\n  {{ i }}\n\u003c/th\u003e\n\u003c!--result:\n0.5, 1, 1.5, 2, 2.5\n```\n### pluck\nUsed map\n```js\n$scope.users = [\n  { id:1, user: { name: 'Foo' } },\n  { id:1, user: { name: 'Bar' } },\n  { id:1, user: { name: 'Baz' } }\n];\n```\n```html\n\u003cth ng-repeat=\"name in users | map: 'user.name' \"\u003e\n  {{ name }}\n\u003c/th\u003e\n\u003c!--result:\nFoo\nBar\nBaz\n```\n### range\nReturn a new collection from a given length, start, increment, and callback\u003cbr/\u003e\nBy default start is 0, increment is 1, and callback is null.\n**Usage:** ```collection | range: length:start:increment:callback```\u003cbr/\u003e\n```html\n[\u003cspan ng-repeat=\"i in [] | range: 3\"\u003e{{i}},\u003c/span\u003e]\n\u003c!--result:\n[0,1,2,]\n--\u003e\n```\n```html\n[\u003cspan ng-repeat=\"i in [] | range: 10:10\"\u003e{{i}},\u003c/span\u003e]\n\u003c!--result:\n[10,11,12,13,14,15,16,17,18,19,]\n--\u003e\n```\n```html\n[\u003cspan ng-repeat=\"i in [] | range: 10:5:2\"\u003e{{ i }},\u003c/span\u003e]\n\u003c!--result:\n[5, 7, 9, 11, 13, 15, 17, 19, 21, 23]\n--\u003e\n```\n```html\n[\u003cspan ng-repeat=\"i in [] | range: 11:4:2\"\u003e{{ i }},\u003c/span\u003e]\n\u003c!--result:\n[4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24]\n--\u003e\n```\n```js\n$scope.double = function(i) {\n  return i * 2;\n}\n```\n```html\n[\u003cspan ng-repeat=\"i in [] | range: 11:4:2:double\"\u003e{{ i }},\u003c/span\u003e]\n\u003c!--result:\n[8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48]\n--\u003e\n```\n\n## String\n\n### ucfirst\n\nucfirstFilter get string as parameter and return it capitalized\n\n```html\n\u003cp\u003e {{ 'foo bar baz' | ucfirst }}\u003c/p\u003e\n\n\u003c!--\nresult:\nFoo Bar Baz\n--\u003e\n```\n\n### uriEncode\nget string as parameter and return encoded uri\n\n```html\n\u003ca ng-href=\"http://domain.com/fetch/{{ data.name | uriEncode }}\"\u003eLink\u003c/a\u003e\n```\n\n### uriComponentEncode\nget string as parameter and return encoded uri component\n\n```html\n\u003ca ng-href=\"http://domain.com/fetch/{{ 'Some\u0026strange=chars' | uriComponentEncode }}\"\u003eLink\u003c/a\u003e\n```\n\n### slugify\nTransform text into a URL slug. Replaces whitespaces, with dash(\"-\"), or given argument\n\n```html\n\u003ca ng-href=\"http://domain.com/fetch/{{ 'Some string with spaces' | slugify }}\"\u003eLink\u003c/a\u003e\n\u003c!--replace with given argument--\u003e\n\u003ca ng-href=\"http://domain.com/fetch/{{ 'Some string with spaces' | slugify:'=' }}\"\u003eLink\u003c/a\u003e\n\u003c!--\nresult:\n\u003ca ng-href=\"http://domain.com/fetch/some-string-with-spaces\"\u003eLink\u003c/a\u003e\n\n\u003ca ng-href=\"http://domain.com/fetch/some=string=with=spaces\"\u003eLink\u003c/a\u003e\n--\u003e\n```\n\n### latinize\nRemove accents/diacritics from a string\n\n```html\n {{ 'Sòme strÏng with Âccénts' | latinize }}\n\u003c!--\nresult:\n  Some strIng with Accents\n--\u003e\n```\n### startsWith\nreturn whether string starts with the starts parameter.\u003cbr/\u003e\nusage: ```string | startsWith: 'start': case-sensitive[optional]```\u003cbr/\u003e\n```html\n {{ 'Lorem ipsum' | startsWith: 'lorem' }}\n {{ 'Lorem Ipsum' | startsWith: 'lorem': true }}\n \u003c!--result:\n  true\n  false\n```\n### endsWith\nreturn whether string ends with the ends parameter.\u003cbr/\u003e\nusage: ```string | endsWith: 'ends': case-sensitive[optional]```\u003cbr/\u003e\n```html\n {{ 'image.JPG' | endsWith: '.jpg' }}\n {{ 'image.JPG' | endsWith: '.jpg': true }}\n \u003c!--result:\n  true\n  false\n```\n### stripTags\nstrip out html tags from string\u003cbr/\u003e\n**Important: this filter jobs it's not to replace ng-bind-html directive, it's only for tiny plain text\n\n```js\n$scope.text = '\u003cp class=\"paragraph\"\u003eLorem Ipsum is simply dummy text of the printing...\u003c/p\u003e';\n```\n```html\n\u003cp\u003e{{ text | stripTags }}\u003c/p\u003e\n\u003c!--result:\nLorem Ipsum is simply dummy text of the printing...\n--\u003e\n```\n### stringular\nget string with {n} and replace match with enumeration values\n\n```html\n\u003cp\u003e{{ 'lorem {0} dolor {1} amet' | stringular:'ipsum':'sit' }}\u003c/p\u003e\n\u003cp\u003e{{ '{3} {0} dolor {1} amet' | stringular:'ipsum':'sit':null:'lorem' }}\u003c/p\u003e\n\n\u003c!-- result:\n\u003cp\u003elorem ipsum dolor sit amet\u003c/p\u003e\n\u003cp\u003elorem ipsum dolor sit amet\u003c/p\u003e\n--\u003e\n\n\u003cp\u003e{{ 'lorem {0} dolor sit amet' | stringular }}\u003cp\u003e\n\u003c!--result:\n\u003cp\u003elorem {0} dolor sit amet\u003c/p\u003e\n```\n\n### phoneUS\nFormat a string or a number into a us-style phone number  \n```html\n\u003cp\u003e{{ 1234567890 | phoneUS }}\u003c/p\u003e\n\n\u003c!--result:\n\u003cp\u003e(123) 456-7890\u003c/p\u003e\n```\n\n### truncate\ntruncates a string given a specified length, providing a custom string to denote an omission.\u003cbr/\u003e\nusage: ``` | truncate: [length]: [suffix-optional]: [preserve-optinal]```\u003cbr/\u003e\n```js\n$scope.text = 'lorem ipsum dolor sit amet';\n```\n```html\n\u003c!--should not cut words in the middle if preserve is true--\u003e\n\u003cp\u003e{{ text | truncate: 7: '...': true }}\u003c/p\u003e\n\n\u003cp\u003e{{ text | truncate: 13: '...' }}\u003c/p\u003e\n\n\u003c!--should not touch string that shorter than the provided length --\u003e\n\u003cp\u003e{{ text | truncate: 50: '...' }}\u003c/p\u003e\n\n\u003c!--result:\nlorem ipsum...\nlorem ipsum d...\nlorem ipsum dolor sit amet\n```\n### split\ntruncates a string given a specified length, providing a custom string to denote an omission.\u003cbr/\u003e\nusage: ``` | split: [delimiter]: [skip-optional]```\u003cbr/\u003e\n```js\n$scope.text = 'lorem ipsum dolor sit amet';\n```\n```html\n\n\u003cp\u003e{{ text | split: ' ' }}\u003c/p\u003e\n\n\u003cp\u003e{{ text | split: ' ': 2}}\u003c/p\u003e\n\n\u003c!--result:\n['lorem', 'ipsum', 'dolor', 'sit', 'amet']\n['lorem ipsum dolor', 'sit', 'amet']\n```\n### reverse\nReverses a string\n```js\n$scope.text = 'lorem ipsum dolor sit amet';\n```\n```html\n\u003cp\u003e{{ text | reverse }}\u003c/p\u003e\n\u003c!--result:\ntema tis rolod muspi merol\n```\n### wrap\nWrap a string with another string\u003cbr/\u003e\nusage: ```string | wrap: string: string[optional]```\n```html\n\u003cp\u003e{{ 'foo' | wrap: '/' }}\u003c/p\u003e\n\u003cp\u003e{{ 'foo' | wrap: '{{': '}}' }}\u003c/p\u003e\n\u003c!--result:\n/foo/\n{{foo}}\n```\n### trim\nStrip whitespace (or other characters) from the beginning and end of a string\u003cbr/\u003e\nusage: ```string | trim: chars[optional]```\n```html\n\u003cp\u003e{{ '    foo   ' | trim }}\u003c/p\u003e\n\u003cp\u003e{{ 'foobarfoo' | trim: 'foo' }}\n\u003c!--result:\nfoo\nbar\n```\n### ltrim\nStrip whitespace (or other characters) from the beginning of a string\u003cbr/\u003e\nusage: ```string | ltrim: chars[optional]```\n```html\n\u003cp\u003e{{ 'barfoobar' | ltrim: 'bar' }}\n\u003c!--result:\nfoobar\n```\n### rtrim\nStrip whitespace (or other characters) from the end of a string\u003cbr/\u003e\nusage: ```string | rtrim: chars[optional]```\n```html\n\u003cp\u003e{{ 'barfoobar' | rtrim: 'bar' }}\n\u003c!--result:\nbarfoo\n```\n### repeat\nRepeats a string n times\u003cbr/\u003e\n**Usage:** ```string | repeat: n: separator[optional]```\n```html\n\u003cp\u003e{{ 'foo' | repeat: 3: '-' }}\u003c/p\u003e\n\u003c!--repeat:\nfoo-foo-foo\n```\n### test\nTest if a string match a pattern\u003cbr/\u003e\n**Usage:** ```string | test: pattern: flag[optional]```\n```html\n\u003cp\u003e{{ '15/12/2003' | test: '^[0-9]{2}[/]{1}[0-9]{2}[/]{1}[0-9]{4}$': 'i' }}\u003c/p\u003e\n\u003cp\u003e{{ '0123456' | test: '\\\\D': 'i' }}\u003c/p\u003e\n\u003c!--result:\ntrue\ntrue\n```\n### match\nReturn an array of matched element in a string\u003cbr/\u003e\n**Usage:** ```string | match: pattern: flag[optional]```\n```html\n\u003cp\u003e{{ '15/12/2003' | match: '\\\\d+': 'g' }}\u003c/p\u003e\n\u003c!--result:\n['15', '12', '2003']\n```\n\n## Math\n\n### max\nmax find and return the largest number in a given array.\nif an `expression` is provided, will return max value by expression.\n**Usage:** ```array | max: expression[optional]```\n```js\n$scope.users = [\n  { user: { score: 988790 } },\n  { user: { score: 123414 } },\n  { user: { rank : 988999 } },\n  { user: { score: 987621 } }\n];\n```\n```html\n\u003cp\u003e {{ [1,2,3,4,7,8,9] | max }}\u003c/p\u003e\n\u003cp\u003e {{ users | max: 'user.score || user.rank' }}\u003c/p\u003e\n\u003c!--\nresult:\n* 9\n* { user: { rank : 988999 } }\n```\n\n### min\nmin find and return the lowest number in a given array.\nif an `expression` is provided, will return min value by expression.\n**Usage:** ```array | min: expression[optional]```\n```js\n$scope.users = [\n  { user: { score: 988790 } },\n  { user: { score: 123414 } },\n  { user: { score: 987621 } }\n];\n```\n```html\n\u003cp\u003e {{ [1,2,3,4,7,8,9] | min }}\u003c/p\u003e\n\u003cp\u003e {{ users | min: 'user.score' }}\u003c/p\u003e\n\u003c!--\nresult:\n* 1\n* { user: { score: 123414 } }\n```\n### abs\nReturns the absolute value of a number\n**Usage:** ```number | string```\n```html\n\u003cdiv ng-repeat=\"val in [-2.2, 1.3, '-3.4', '4.5']\"\u003eThe absolute value of {{val}} is {{val | abs}}\u003c/div\u003e\n\u003c!--\nresult:\n* The absolute value of -1.2 is 1.2\n* The absolute value of 2.3 is 2.3\n* The absolute value of -3.4 is 3.4\n* The absolute value of '4.5' is 4.5\n```\n### percent\nPercentage between two numbers\u003cbr/\u003e\n**Usage:** ``` number | percent: total: round[optional]```, round by default false.\n```html\n\u003cp\u003e{{ 23 | percent: 500 }}\u003c/p\u003e\n\u003cp\u003e{{ 23 | percent: 500: true }}\u003c/p\u003e\n\u003c!--result:\n4.6\n4\n```\n### radix\nConverting decimal numbers to different bases(radix)\u003cbr/\u003e\n**Usage:** ```number | radix: base```\n```html\n\u003cp\u003e{{ 8 | radix: 2 }}\u003c/p\u003e\n\u003cp\u003e{{ 32586 | radix: 16 }}\u003c/p\u003e\n\u003c!--result:\n1000\n7F4A\n```\n### sum\nSum up all values within an array\u003cbr/\u003e\n**Usage:** ```array | sum: initial-value[optional]```\n```html\n{{ [2,3,5] | sum }}\n{{ [2,3,5] | sum: 10 }}\n\u003c!--result\n10\n20\n```\n### degrees\nConverts radians into degrees\u003cbr/\u003e\n**Usage:** ```radians | degrees: round-to-decimal```,\n```html\n\u003cp\u003e{{ 0.785398 | degrees: 0 }}\u003c/p\u003e\n\u003cp\u003e{{ -1.57 | degrees: 3 }}\u003c/p\u003e\n\u003c!--result\n45\n-89.954\n```\n### radians\nConverts degrees into radians\u003cbr/\u003e\n**Usage:** ```degrees | radians: round-to-decimal```,\n```html\n\u003cp\u003e{{ 45 | radians: 2 }}\u003c/p\u003e\n\u003cp\u003e{{ 180 | radians: 5 }}\u003c/p\u003e\n\u003c!--result\n0.79\n3.14159\n```\n### shortFmt\nConverts numbers into formatted display\u003cbr/\u003e\n**Usage:** ```number | shortFmt: round-to-decimal```,\n```html\n\u003cp\u003e{{ 45000 | shortFmt: 0 }}\u003c/p\u003e\n\u003cp\u003e{{ 18234822 | shortFmt: 1 }}\u003c/p\u003e\n\u003c!--result\n45 k\n18.2 m\n```\n### byteFmt\nConverts bytes into formatted display\u003cbr/\u003e\n**Usage:** ```number | byteFmt: round-to-decimal```,\n```html\n\u003cp\u003e{{ 1998 | byteFmt: 2 }}\u003c/p\u003e\n\u003cp\u003e{{ 1339234901 | byteFmt: 5 }}\u003c/p\u003e\n\u003c!--result\n1.95 KB\n1.24726 GB\n```\n### kbFmt\nConverts kilobytes into formatted display\u003cbr/\u003e\n**Usage:** ```number | kbFmt: round-to-decimal```,\n```html\n\u003cp\u003e{{ 1024 | kbFmt: 0 }}\u003c/p\u003e\n\u003cp\u003e{{ 1049901 | kbFmt: 5 }}\u003c/p\u003e\n\u003c!--result\n1 MB\n1.00126 GB\n\n```\n## Boolean\n\u003eUsed for boolean expression in chaining filters\n\n### isGreaterThan\n**aliases:** `\u003e`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isGreaterThan: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | \u003e: num }}\"\u003e\u003c/div\u003e\n```\n\n### isGreaterThanOrEqualTo\n**aliases:** `\u003e=`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isGreaterThanOrEqualTo: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | \u003e=: num }}\"\u003e\u003c/div\u003e\n```\n\n### isLessThan\n**aliases:** `\u003c`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isLessThan: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | \u003c: num }}\"\u003e\u003c/div\u003e\n```\n\n### isLessThanOrEqualTo\n**aliases:** `\u003c=`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isLessThanOrEqualTo: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | \u003c=: num }}\"\u003e\u003c/div\u003e\n```\n\n### isEqualTo\n**aliases:** `==`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isEqualTo: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | ==: num }}\"\u003e\u003c/div\u003e\n```\n\n### isNotEqualTo\n**aliases:** `!=`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isNotEqualTo: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | !=: num }}\"\u003e\u003c/div\u003e\n```\n\n### isIdenticalTo\n**aliases:** `===`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isIdenticalTo: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | ===: num }}\"\u003e\u003c/div\u003e\n```\n\n### isNotIdenticalTo\n**aliases:** `!==`\n```html\n\u003cdiv ng-show=\"{{ array | map | sum | isNotIdenticalTo: num }}\"\u003e\u003c/div\u003e\n\u003c!--or: --\u003e\n\u003cdiv ng-show=\"{{ array | map | sum | !==: num }}\"\u003e\u003c/div\u003e\n```\n## Changelog\n### 0.5.7\n* fix issue #119\n\n### 0.5.6\n* fix issue #145\n\n### 0.5.5\n* add `range` and `chunk-by` filters\n* fix issue #139\n\n### 0.5.4\n* add `match` and `test` filters\n\n### 0.5.3\n* add `latinize` filter\n\n### 0.5.1\n* `min` and `max` can get a property as an argument.\n* improve `slugify` filter.\n* refactor `filterWatcher`(memoize), now it works like a charm.\n* refactor `groupBy` now it can get be chain with other filters\n\n### 0.4.9\n* fix issue #38 with [reverseFilter](#reverse)\n\n### 0.4.8\n* add [defaultsFilter](#defaults)\n* improve docs, tests\n\n### 0.4.7\n* add [condition filters](#Boolean) set.\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## TODO\n- Add project website on branch gh-pages, see **[Github-help](https://help.github.com/articles/creating-project-pages-manually)**\n\n## Contributing\n* If you planning add some feature please **create issue before**.\n* Don't forget about tests.\n\nClone the project: \u003cbr/\u003e\n```bash\n$ git clone\n$ npm install\n$ bower install\n```\nRun the tests:\n```bash\n$ grunt test\n```\n\n[npm-image]: https://img.shields.io/npm/v/angular-filter.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/angular-filter\n[travis-image]: https://img.shields.io/travis/a8m/angular-filter.svg?style=flat-square\n[travis-url]: https://travis-ci.org/a8m/angular-filter\n[coveralls-image]: https://img.shields.io/coveralls/a8m/angular-filter.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/a8m/angular-filter\n[license-image]: http://img.shields.io/npm/l/angular-filter.svg?style=flat-square\n[license-url]: LICENSE\n[gitter-image]: https://badges.gitter.im/Join%20Chat.svg\n[gitter-url]: https://gitter.im/a8m/angular-filter?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n","funding_links":[],"categories":["JavaScript","Filter","AngularJS ##","Web 前端","Web Development"],"sub_categories":["Version 1.x ###","Angular"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa8m%2Fangular-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa8m%2Fangular-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa8m%2Fangular-filter/lists"}