"description":"Block helper that filters the given array and renders the block for values that evaluate to `true`, otherwise the inverse block is returned."
"description":"<p>Block helper that filters the given array and renders the block for values that evaluate to <code>true</code>, otherwise the inverse block is returned.</p>\n"
"description":"Returns the first item, or first `n` items of an array."
"description":"<p>Returns the first item, or first <code>n</code> items of an array.</p>\n"
},
"forEach":{
"args":[
@ -186,7 +186,7 @@
],
"numArgs":1,
"example":"handlebars <!-- accounts = [ {'name': 'John', 'email': 'john@example.com'}, {'name': 'Malcolm', 'email': 'malcolm@example.com'}, {'name': 'David', 'email': 'david@example.com'} ] --> {{#forEach accounts}} <a href=\"mailto:{{ email }}\" title=\"Send an email to {{ name }}\"> {{ name }} </a>{{#unless isLast}}, {{/unless}} {{/forEach}} ",
"description":"Iterates over each item in an array and exposes the current item in the array as context to the inner block. In addition to the current array item, the helper exposes the following variables to the inner block: - `index` - `total` - `isFirst` - `isLast` Also, `@index` is exposed as a private variable, and additional private variables may be defined as hash arguments."
"description":"<p>Iterates over each item in an array and exposes the current item in the array as context to the inner block. In addition to the current array item, the helper exposes the following variables to the inner block: - <code>index</code> - <code>total</code> - <code>isFirst</code> - <code>isLast</code> Also, <code>@index</code> is exposed as a private variable, and additional private variables may be defined as hash arguments.</p>\n"
"description":"Block helper that renders the block if an array has the given `value`. Optionally specify an inverse block to render when the array does not have the given value."
"description":"<p>Block helper that renders the block if an array has the given <code>value</code>. Optionally specify an inverse block to render when the array does not have the given value.</p>\n"
"description":"Join all elements of array into a string, optionally using a given separator."
"description":"<p>Join all elements of array into a string, optionally using a given separator.</p>\n"
},
"equalsLength":{
"args":[
@ -231,7 +231,7 @@
"options"
],
"numArgs":3,
"description":"Returns true if the the length of the given `value` is equal to the given `length`. Can be used as a block or inline helper."
"description":"<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"
},
"last":{
"args":[
@ -240,7 +240,7 @@
],
"numArgs":2,
"example":"handlebars <!-- var value = ['a', 'b', 'c', 'd', 'e'] --> {{last value}} <!-- results in: ['e'] --> {{last value 2}} <!-- results in: ['d', 'e'] --> {{last value 3}} <!-- results in: ['c', 'd', 'e'] --> ",
"description":"Returns the last item, or last `n` items of an array or string. Opposite of [first](#first)."
"description":"<p>Returns the last item, or last <code>n</code> items of an array or string. Opposite of <a href=\"#first\">first</a>.</p>\n"
"description":"Returns the length of the given string or array."
"description":"<p>Returns the length of the given string or array.</p>\n"
},
"lengthEqual":{
"args":[
@ -257,7 +257,7 @@
"options"
],
"numArgs":3,
"description":"Returns true if the the length of the given `value` is equal to the given `length`. Can be used as a block or inline helper."
"description":"<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"
},
"map":{
"args":[
@ -266,7 +266,7 @@
],
"numArgs":2,
"example":"handlebars <!-- array: ['a', 'b', 'c'], and \"double\" is a fictitious function that duplicates letters --> {{map array double}} <!-- results in: '[\"aa\", \"bb\", \"cc\"]' --> ",
"description":"Returns a new array, created by calling `function` on each element of the given `array`. For example,"
"description":"<p>Returns a new array, created by calling <code>function</code> on each element of the given <code>array</code>. For example,</p>\n"
"description":"Map over the given object or array or objects and create an array of values from the given `prop`. Dot-notation may be used (as a string) to get nested properties."
"description":"<p>Map over the given object or array or objects and create an array of values from the given <code>prop</code>. Dot-notation may be used (as a string) to get nested properties.</p>\n"
"description":"Reverse the elements in an array, or the characters in a string."
"description":"<p>Reverse the elements in an array, or the characters in a string.</p>\n"
},
"some":{
"args":[
@ -293,7 +293,7 @@
],
"numArgs":3,
"example":"handlebars <!-- array: [1, 'b', 3] --> {{#some array isString}} Render me if the array has a string. {{else}} Render me if it doesn't. {{/some}} <!-- results in: 'Render me if the array has a string.' --> ",
"description":"Block helper that returns the block if the callback returns true for some value in the given array."
"description":"<p>Block helper that returns the block if the callback returns true for some value in the given array.</p>\n"
"description":"Sort the given `array`. If an array of objects is passed, you may optionally pass a `key` to sort on as the second argument. You may alternatively pass a sorting function as the second argument."
"description":"<p>Sort the given <code>array</code>. If an array of objects is passed, you may optionally pass a <code>key</code> to sort on as the second argument. You may alternatively pass a sorting function as the second argument.</p>\n"
"description":"Sort an `array`. If an array of objects is passed, you may optionally pass a `key` to sort on as the second argument. You may alternatively pass a sorting function as the second argument."
"description":"<p>Sort an <code>array</code>. If an array of objects is passed, you may optionally pass a <code>key</code> to sort on as the second argument. You may alternatively pass a sorting function as the second argument.</p>\n"
"description":"Use the items in the array _after_ the specified index as context inside a block. Opposite of [withBefore](#withBefore)."
"description":"<p>Use the items in the array <em>after</em> the specified index as context inside a block. Opposite of <a href=\"#withBefore\">withBefore</a>.</p>\n"
"description":"Use the items in the array _before_ the specified index as context inside a block. Opposite of [withAfter](#withAfter)."
"description":"<p>Use the items in the array <em>before</em> the specified index as context inside a block. Opposite of <a href=\"#withAfter\">withAfter</a>.</p>\n"
"description":"Use the last item or `n` items in an array as context inside a block. Opposite of [withFirst](#withFirst)."
"description":"<p>Use the last item or <code>n</code> items in an array as context inside a block. Opposite of <a href=\"#withFirst\">withFirst</a>.</p>\n"
"description":"Block helper that return an array with all duplicate values removed. Best used along with a [each](#each) helper."
"description":"<p>Block helper that return an array with all duplicate values removed. Best used along with a <a href=\"#each\">each</a> helper.</p>\n"
}
},
"number":{
@ -389,21 +389,21 @@
"number"
],
"numArgs":1,
"description":"Format a number to it's equivalent in bytes. If a string is passed, it's length will be formatted and returned. **Examples:** - `'foo' => 3 B` - `13661855 => 13.66 MB` - `825399 => 825.39 kB` - `1396 => 1.4 kB`"
"description":"<p>Format a number to it's equivalent in bytes. If a string is passed, it's length will be formatted and returned. <strong>Examples:</strong> - <code>'foo' => 3 B</code> - <code>13661855 => 13.66 MB</code> - <code>825399 => 825.39 kB</code> - <code>1396 => 1.4 kB</code></p>\n"
},
"addCommas":{
"args":[
"num"
],
"numArgs":1,
"description":"Add commas to numbers"
"description":"<p>Add commas to numbers</p>\n"
},
"phoneNumber":{
"args":[
"num"
],
"numArgs":1,
"description":"Convert a string or number to a formatted phone number."
"description":"<p>Convert a string or number to a formatted phone number.</p>\n"
},
"toAbbr":{
"args":[
@ -411,7 +411,7 @@
"precision"
],
"numArgs":2,
"description":"Abbreviate numbers to the given number of `precision`. This for general numbers, not size in bytes."
"description":"<p>Abbreviate numbers to the given number of <code>precision</code>. This for general numbers, not size in bytes.</p>\n"
},
"toExponential":{
"args":[
@ -420,7 +420,7 @@
],
"numArgs":2,
"example":"handlebars {{toExponential number digits}}; ",
"description":"Returns a string representing the given number in exponential notation."
"description":"<p>Returns a string representing the given number in exponential notation.</p>\n"
"description":"Returns a string representing the `Number` object to the specified precision."
"description":"<p>Returns a string representing the <code>Number</code> object to the specified precision.</p>\n"
}
},
"url":{
@ -461,31 +461,31 @@
"str"
],
"numArgs":1,
"description":"Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character."
"description":"<p>Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.</p>\n"
},
"escape":{
"args":[
"str"
],
"numArgs":1,
"description":"Escape the given string by replacing characters with escape sequences. Useful for allowing the string to be used in a URL, etc."
"description":"<p>Escape the given string by replacing characters with escape sequences. Useful for allowing the string to be used in a URL, etc.</p>\n"
},
"decodeURI":{
"args":[
"str"
],
"numArgs":1,
"description":"Decode a Uniform Resource Identifier (URI) component."
"description":"<p>Decode a Uniform Resource Identifier (URI) component.</p>\n"
},
"url_encode":{
"args":[],
"numArgs":0,
"description":"Alias for [encodeURI](#encodeuri)."
"description":"<p>Alias for <a href=\"#encodeuri\">encodeURI</a>.</p>\n"
},
"url_decode":{
"args":[],
"numArgs":0,
"description":"Alias for [decodeURI](#decodeuri)."
"description":"<p>Alias for <a href=\"#decodeuri\">decodeURI</a>.</p>\n"
},
"urlResolve":{
"args":[
@ -493,21 +493,21 @@
"href"
],
"numArgs":2,
"description":"Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag."
"description":"<p>Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.</p>\n"
},
"urlParse":{
"args":[
"str"
],
"numArgs":1,
"description":"Parses a `url` string into an object."
"description":"<p>Parses a <code>url</code> string into an object.</p>\n"
},
"stripQuerystring":{
"args":[
"url"
],
"numArgs":1,
"description":"Strip the query string from the given `url`."
"description":"<p>Strip the query string from the given <code>url</code>.</p>\n"
"description":"Strip protocol from a `url`. Useful for displaying media that may have an 'http' protocol on secure connections."
"description":"<p>Strip protocol from a <code>url</code>. Useful for displaying media that may have an 'http' protocol on secure connections.</p>\n"
}
},
"string":{
@ -526,7 +526,7 @@
],
"numArgs":2,
"example":"handlebars <!-- given that \"item.stem\" is \"foo\" --> {{append item.stem \".html\"}} <!-- results in: 'foo.html' --> ",
"description":"Append the specified `suffix` to the given string."
"description":"<p>Append the specified <code>suffix</code> to the given string.</p>\n"
"description":"Like trim, but removes both extraneous whitespace **and non-word characters** from the beginning and end of a string."
"description":"<p>Like trim, but removes both extraneous whitespace <strong>and non-word characters</strong> from the beginning and end of a string.</p>\n"
"description":"Uppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks."
"description":"<p>Uppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.</p>\n"
"description":"Helper that renders the block if **both** of the given values are truthy. If an inverse block is specified it will be rendered when falsy. Works as a block helper, inline helper or subexpression."
"description":"<p>Helper that renders the block if <strong>both</strong> of the given values are truthy. If an inverse block is specified it will be rendered when falsy. Works as a block helper, inline helper or subexpression.</p>\n"
},
"compare":{
"args":[
@ -836,7 +836,7 @@
"options"
],
"numArgs":4,
"description":"Render a block when a comparison of the first and third arguments returns true. The second argument is the [arithemetic operator][operators] to use. You may also optionally specify an inverse block to render when falsy."
"description":"<p>Render a block when a comparison of the first and third arguments returns true. The second argument is the [arithemetic operator][operators] to use. You may also optionally specify an inverse block to render when falsy.</p>\n"
},
"contains":{
"args":[
@ -847,7 +847,7 @@
],
"numArgs":4,
"example":"handlebars <!-- array = ['a', 'b', 'c'] --> {{#contains array \"d\"}} This will not be rendered. {{else}} This will be rendered. {{/contains}} ",
"description":"Block helper that renders the block if `collection` has the given `value`, using strict equality (`===`) for comparison, otherwise the inverse block is rendered (if specified). If a `startIndex` is specified and is negative, it is used as the offset from the end of the collection."
"description":"<p>Block helper that renders the block if <code>collection</code> has the given <code>value</code>, using strict equality (<code>===</code>) for comparison, otherwise the inverse block is rendered (if specified). If a <code>startIndex</code> is specified and is negative, it is used as the offset from the end of the collection.</p>\n"
},
"default":{
"args":[
@ -855,7 +855,7 @@
"defaultValue"
],
"numArgs":2,
"description":"Returns the first value that is not undefined, otherwise the \"default\" value is returned."
"description":"<p>Returns the first value that is not undefined, otherwise the "default" value is returned.</p>\n"
},
"eq":{
"args":[
@ -864,7 +864,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `a` is **equal to** `b`. If an inverse block is specified it will be rendered when falsy. You may optionally use the `compare=\"\"` hash argument for the second value."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=""</code> hash argument for the second value.</p>\n"
},
"gt":{
"args":[
@ -873,7 +873,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `a` is **greater than** `b`. If an inverse block is specified it will be rendered when falsy. You may optionally use the `compare=\"\"` hash argument for the second value."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>greater than</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=""</code> hash argument for the second value.</p>\n"
},
"gte":{
"args":[
@ -882,7 +882,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `a` is **greater than or equal to** `b`. If an inverse block is specified it will be rendered when falsy. You may optionally use the `compare=\"\"` hash argument for the second value."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>greater than or equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=""</code> hash argument for the second value.</p>\n"
},
"has":{
"args":[
@ -891,7 +891,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `value` has `pattern`. If an inverse block is specified it will be rendered when falsy."
"description":"<p>Block helper that renders a block if <code>value</code> has <code>pattern</code>. If an inverse block is specified it will be rendered when falsy.</p>\n"
},
"isFalsey":{
"args":[
@ -899,7 +899,7 @@
"options"
],
"numArgs":2,
"description":"Returns true if the given `value` is falsey. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper."
"description":"<p>Returns true if the given <code>value</code> is falsey. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper.</p>\n"
},
"isTruthy":{
"args":[
@ -907,7 +907,7 @@
"options"
],
"numArgs":2,
"description":"Returns true if the given `value` is truthy. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper."
"description":"<p>Returns true if the given <code>value</code> is truthy. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper.</p>\n"
},
"ifEven":{
"args":[
@ -916,7 +916,7 @@
],
"numArgs":2,
"example":"handlebars {{#ifEven value}} render A {{else}} render B {{/ifEven}} ",
"description":"Return true if the given value is an even number."
"description":"<p>Return true if the given value is an even number.</p>\n"
},
"ifNth":{
"args":[
@ -925,7 +925,7 @@
"options"
],
"numArgs":3,
"description":"Conditionally renders a block if the remainder is zero when `a` operand is divided by `b`. If an inverse block is specified it will be rendered when the remainder is **not zero**."
"description":"<p>Conditionally renders a block if the remainder is zero when <code>a</code> operand is divided by <code>b</code>. If an inverse block is specified it will be rendered when the remainder is <strong>not zero</strong>.</p>\n"
},
"ifOdd":{
"args":[
@ -934,7 +934,7 @@
],
"numArgs":2,
"example":"handlebars {{#ifOdd value}} render A {{else}} render B {{/ifOdd}} ",
"description":"Block helper that renders a block if `value` is **an odd number**. If an inverse block is specified it will be rendered when falsy."
"description":"<p>Block helper that renders a block if <code>value</code> is <strong>an odd number</strong>. If an inverse block is specified it will be rendered when falsy.</p>\n"
},
"is":{
"args":[
@ -943,7 +943,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `a` is **equal to** `b`. If an inverse block is specified it will be rendered when falsy. Similar to [eq](#eq) but does not do strict equality."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. Similar to <a href=\"#eq\">eq</a> but does not do strict equality.</p>\n"
},
"isnt":{
"args":[
@ -952,7 +952,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `a` is **not equal to** `b`. If an inverse block is specified it will be rendered when falsy. Similar to [unlessEq](#unlesseq) but does not use strict equality for comparisons."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>not equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. Similar to <a href=\"#unlesseq\">unlessEq</a> but does not use strict equality for comparisons.</p>\n"
},
"lt":{
"args":[
@ -960,7 +960,7 @@
"options"
],
"numArgs":2,
"description":"Block helper that renders a block if `a` is **less than** `b`. If an inverse block is specified it will be rendered when falsy. You may optionally use the `compare=\"\"` hash argument for the second value."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>less than</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=""</code> hash argument for the second value.</p>\n"
},
"lte":{
"args":[
@ -969,7 +969,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if `a` is **less than or equal to** `b`. If an inverse block is specified it will be rendered when falsy. You may optionally use the `compare=\"\"` hash argument for the second value."
"description":"<p>Block helper that renders a block if <code>a</code> is <strong>less than or equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=""</code> hash argument for the second value.</p>\n"
},
"neither":{
"args":[
@ -978,7 +978,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that renders a block if **neither of** the given values are truthy. If an inverse block is specified it will be rendered when falsy."
"description":"<p>Block helper that renders a block if <strong>neither of</strong> the given values are truthy. If an inverse block is specified it will be rendered when falsy.</p>\n"
},
"not":{
"args":[
@ -986,7 +986,7 @@
"options"
],
"numArgs":2,
"description":"Returns true if `val` is falsey. Works as a block or inline helper."
"description":"<p>Returns true if <code>val</code> is falsey. Works as a block or inline helper.</p>\n"
},
"or":{
"args":[
@ -995,7 +995,7 @@
],
"numArgs":2,
"example":"handlebars {{#or a b c}} If any value is true this will be rendered. {{/or}} ",
"description":"Block helper that renders a block if **any of** the given values is truthy. If an inverse block is specified it will be rendered when falsy."
"description":"<p>Block helper that renders a block if <strong>any of</strong> the given values is truthy. If an inverse block is specified it will be rendered when falsy.</p>\n"
},
"unlessEq":{
"args":[
@ -1004,7 +1004,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that always renders the inverse block **unless `a` is equal to `b`**."
"description":"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is equal to <code>b</code></strong>.</p>\n"
},
"unlessGt":{
"args":[
@ -1013,7 +1013,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that always renders the inverse block **unless `a` is greater than `b`**."
"description":"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than <code>b</code></strong>.</p>\n"
},
"unlessLt":{
"args":[
@ -1022,7 +1022,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that always renders the inverse block **unless `a` is less than `b`**."
"description":"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than <code>b</code></strong>.</p>\n"
},
"unlessGteq":{
"args":[
@ -1031,7 +1031,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that always renders the inverse block **unless `a` is greater than or equal to `b`**."
"description":"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than or equal to <code>b</code></strong>.</p>\n"
},
"unlessLteq":{
"args":[
@ -1040,7 +1040,7 @@
"options"
],
"numArgs":3,
"description":"Block helper that always renders the inverse block **unless `a` is less than or equal to `b`**."
"description":"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than or equal to <code>b</code></strong>.</p>\n"
}
},
"date":{
@ -1050,8 +1050,8 @@
"format"
],
"numArgs":2,
"example":"{{date \"5 years ago\" \"YYYY\"}}",
"description":"Format a date using moment.js data formatting."
"example":"{{date now \"YYYY\"}}",
"description":"<p>Format a date using moment.js data formatting.</p>\n"