Skip to content

Commit

Permalink
Merge pull request #39 from leapfrogtechnology/table-of-contents
Browse files Browse the repository at this point in the history
Table of contents (Helpers List)
  • Loading branch information
sanjeevkpandit authored Jun 10, 2016
2 parents 4214396 + 7a7c18c commit 5e22e35
Showing 1 changed file with 45 additions and 3 deletions.
48 changes: 45 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,48 @@ var H = require('just-handlebars-helpers');
H.registerHelpers(Handlebars);
```
## Helpers

| Helper | Description |
|---------------------------------------|---------------------------------------------------------|
| [eq](#eq) | Strict equality `===` |
| [eqw](#eqw) | Equality `==` |
| [neq](#neq) | Strict inequality `!==` |
| [neqw](#neqw) | Inequality `!=` |
| [lt](#lt) | Less than `<` |
| [lte](#lte) | Less than or equal `<=` |
| [gt](#gt) | Greater than `>` |
| [gte](#gte) | Greater than or equal `>=` |
| [not](#not) | Not `!` |
| [ifx](#ifx) | Imitates conditional operator `?:` |
| [empty](#empty) | Check if an array is empty |
| [count](#count) | Length of an array |
| [and](#and) | Logical AND operation |
| [or](#or) | Logical OR operation |
| [coalesce](#coalesce) | Returns first non-falsy value from list of parameters |
| [includes](#includes) | Check for a value inside an array |
| [excerpt](#excerpt) | Extract a sub-string from a string |
| [sanitize](#sanitize) | Sanitize a string to url friendy dash case |
| [newLineToBr](#newlinetobr) | Replace new line with line breaks `<br>` of a string |
| [capitalizeEach](#capitalizeeach) | Capitalize the first letter of each word in a string |
| [capitalizeFirst](#capitalizefirst) | Capitalize the first letter of a string |
| [sprintf](#sprintf) | String produced according to the formatting format |
| [lowercase](#lowercase) | String to lowercase |
| [uppercase](#uppercase) | String to uppercase |
| [first](#first) | First element of an array |
| [last](#last) | Last element of an array |
| [concat](#concat) | Concatenate two or more strings |
| [join](#join) | Join elements of an array using a delimeter |
| [sum](#sum) | Sum of two numbers |
| [difference](#difference) | Difference of two numbers |
| [ceil](#ceil) | Round a number upward to its nearest integer |
| [floor](#floor) | Round a number downward to its nearest integer |
| [formatDate](#formatdate) | Format date to specified format |
| [showIf](#showif) | Show html element if expression is true |
| [hideIf](#hideif) | Hide html element if expression is true |
| [selectedIf](#selectedif) | Select `<option>` if expression is true |
| [checkedIf](#checkedif) | Check the `<input>` checkbox if expression is true |
| [options](#options) | Generate `<option>` list for `<select>` |

### Conditional
#### eq
Determine whether or not two values are equal (===).
Expand Down Expand Up @@ -269,7 +311,7 @@ var array = [5, 6]; // An array.
```

#### and
Returns the boolean AND of two or more parameters passed i.e
Returns the logical AND of two or more parameters passed i.e
it is true iff all the parameters are true.

Parameters:
Expand All @@ -294,7 +336,7 @@ var value1 = false, value2 = true;
```

#### or
Returns the boolean OR of two or more parameters passed i.e
Returns the logical OR of two or more parameters passed i.e
it is true if any of the parameters is true.

Parameters:
Expand Down Expand Up @@ -415,7 +457,7 @@ Usage:
```

#### capitalizeEach
Capitalize each letter of every words in a string.
Capitalize the first letter of each word in a string.

Parameters
```
Expand Down

0 comments on commit 5e22e35

Please sign in to comment.