AngularJs common filters
npm install angularjs-filters  
angularjs-filters
=================
A library of common AngularJS filters. Each filter is individually tested for various inputs. The module can be used by using the filter.js in your browser includes, or by using npm module ( with browserify).
| Filter | Usage | Result |
|---|---|---|
| format | 'Hello {0}. What are you been doing this {1}?' | string.format : 'Sam' : 'evening' | Hello Sam. What are you been doing this evening? |
| html2string | 'Hello <br/>. How are you?' | string.html2string | Hello . How are you? |
| shorten | 'A long story cut into short' | string.shorten : 12 | A long story... |
| replace String Replace. Pattern can be a string or regex | 'Hello Mr How are you doing' | string.replace : 'Mr': 'Sir' "hello help"| string.replace:"he[a-z]{2}":"Yell" | Hello Sir How are you doing Yello Yell |
| camelcase | 'A long story cut into short' | string.camelcase | A Long Story Cut Into Short |
| lowercase | 'Convert to LOWERCASE' | string.lowercase | convert to lowercase |
| uppercase | 'uppercase all' | string.uppercase | UPPERCASE ALL |
| trim, trimstart, trimend String Trim Functions | ' Hello Mr. ' | string.trim | Hello Mr. |
| Filter | Usage | Result |
|---|---|---|
| join | ['Hello','Mr.','How','Are','You?'] | array.join : '-' | Hello-Mr.-How-Are-You? |
| reverse | ng-repeat='["Banana", "Orange", "Apple", "Mango"] | array.reverse' | "Mango","Apple","Orange", "Banana" |
| Filter | Usage | Result |
|---|---|---|
| max | [8, 1, 2, 3, 7] | math.max | 8 |
| min | [8, 1, 2, 3, 7] | math.min | 1 |
| Filter | Usage | Result |
|---|---|---|
| YesNo Converts boolean value to Yes/No | A == B | binary.YesNo | Yes/No? |
| Filter | Usage | Result |
|---|---|---|
| print Debug prints the bound value | 'MyValue' | debug.print | MyValue |
npm run karma
npm run karma2
``