2021-01-27 19:09:04 +01:00
{
"math" : {
"abs" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ abs 12012.1000 }} -> 12012.1" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return the magnitude of <code>a</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"add" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ add 1 2 }} -> 3" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return the sum of <code>a</code> plus <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"avg" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{ avg 1 2 3 4 5 }} -> 3" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns the average of all numbers in the given array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"ceil" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ ceil 1.2 }} -> 2" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Get the <code>Math.ceil()</code> of the given value.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"divide" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ divide 10 5 }} -> 2" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Divide <code>a</code> by <code>b</code></p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"floor" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ floor 1.2 }} -> 1" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Get the <code>Math.floor()</code> of the given value.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"minus" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ subtract 10 5 }} -> 5" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return the product of <code>a</code> minus <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"modulo" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ modulo 10 5 }} -> 0" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Get the remainder of a division operation.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"multiply" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2022-07-29 15:12:04 +02:00
"example" : "{{ multiply 10 5 }} -> 50" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Multiply number <code>a</code> by number <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"plus" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ plus 10 5 }} -> 15" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Add <code>a</code> by <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"random" : {
2024-07-04 17:47:56 +02:00
"args" : [
"min" ,
"max"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ random 0 20 }} -> 10" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Generate a random number between two values</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"remainder" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ remainder 10 6 }} -> 4" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Get the remainder when <code>a</code> is divided by <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"round" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ round 10.3 }} -> 10" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Round the given number.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"subtract" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ subtract 10 5 }} -> 5" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return the product of <code>a</code> minus <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"sum" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-22 12:18:47 +01:00
"example" : "{{ sum [1, 2, 3] }} -> 6" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns the sum of all numbers in the given array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
}
} ,
"array" : {
"after" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"n"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ after ['a', 'b', 'c', 'd'] 2}} -> ['c', 'd']" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns all of the items in an array after the specified index. Opposite of <a href=\"#before\">before</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"arrayify" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{ arrayify 'foo' }} -> ['foo']" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Cast the given <code>value</code> to an array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"before" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"n"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ before ['a', 'b', 'c', 'd'] 3}} -> ['a', 'b']" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return all of the items in the collection before the specified count. Opposite of <a href=\"#after\">after</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"eachIndex" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#eachIndex [1, 2, 3]}} {{item}} is {{index}} {{/eachIndex}} -> ' 1 is 0 2 is 1 3 is 2 '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Iterates the array, listing an item and the index of it.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"filter" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"value" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#filter [1, 2, 3] 2}}2 Found{{else}}2 not found{{/filter}} -> 2 Found" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"first" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"n"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{first [1, 2, 3, 4] 2}} -> 1,2" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns the first item, or first <code>n</code> items of an array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"forEach" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"options"
] ,
2024-01-30 10:20:52 +01:00
"numArgs" : 2 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#forEach [{ 'name': 'John' }] }} {{ name }} {{/forEach}} -> ' John '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"inArray" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"value" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#inArray [1, 2, 3] 2}} 2 exists {{else}} 2 does not exist {{/inArray}} -> ' 2 exists '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"isArray" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{isArray [1, 2]}} -> true" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns true if <code>value</code> is an es5 array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"itemAt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"idx"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{itemAt [1, 2, 3] 1}} -> 2" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns the item from <code>array</code> at index <code>idx</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"join" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"separator"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{join [1, 2, 3]}} -> 1, 2, 3" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Join all elements of array into a string, optionally using a given separator.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"equalsLength" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value" ,
"length"
] ,
2024-01-30 10:20:52 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{equalsLength [1, 2, 3] 3}} -> true" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:54:00 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"last" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value" ,
"n"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{last [1, 2, 3]}} -> 3" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"length" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{length [1, 2, 3]}} -> 3" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns the length of the given string or array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"lengthEqual" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value" ,
"length"
] ,
2024-01-30 10:20:52 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{equalsLength [1, 2, 3] 3}} -> true" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:54:00 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"map" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"fn"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{map [1, 2, 3] double}} -> [2, 4, 6]" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"pluck" : {
2024-07-04 17:47:56 +02:00
"args" : [
"collection" ,
"prop"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{pluck [{ 'name': 'Bob' }] 'name' }} -> ['Bob']" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"reverse" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{reverse [1, 2, 3]}} -> [3, 2, 1]" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Reverse the elements in an array, or the characters in a string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"some" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"iter" ,
"provided"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#some [1, \"b\", 3] isString}} string found {{else}} No string found {{/some}} -> ' string found '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that returns the block if the callback returns true for some value in the given array.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"sort" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"key"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ sort ['b', 'a', 'c'] }} -> ['a', 'b', 'c']" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"sortBy" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"props"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ sortBy [{'a': 'zzz'}, {'a': 'aaa'}] 'a' }} -> [{'a':'aaa'},{'a':'zzz'}]" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"withAfter" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"idx" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#withAfter [1, 2, 3] 1 }} {{this}} {{/withAfter}} -> ' 2 3 '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"withBefore" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"idx" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#withBefore [1, 2, 3] 2 }} {{this}} {{/withBefore}} -> ' 1 '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"withFirst" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"idx" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#withFirst [1, 2, 3] }}{{this}}{{/withFirst}} -> 1" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Use the first item in a collection inside a handlebars block expression. Opposite of <a href=\"#withLast\">withLast</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"withGroup" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"size" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#withGroup [1, 2, 3, 4] 2}}{{#each this}}{{.}}{{/each}}<br>{{/withGroup}} -> 12<br>34<br>" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that groups array elements by given group <code>size</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"withLast" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"idx" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#withLast [1, 2, 3, 4]}}{{this}}{{/withLast}} -> 4" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"withSort" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"prop" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#withSort ['b', 'a', 'c']}}{{this}}{{/withSort}} -> abc" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that sorts a collection and exposes the sorted collection as context inside the block.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"unique" : {
2024-07-04 17:47:56 +02:00
"args" : [
"array" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#each (unique ['a', 'a', 'c', 'b', 'e', 'e']) }}{{.}}{{/each}} -> acbe" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
}
} ,
"number" : {
"bytes" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ bytes 1386 1 }} -> 1.4 kB" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"addCommas" : {
2024-07-04 17:47:56 +02:00
"args" : [
"num"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ addCommas 1000000 }} -> 1,000,000" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Add commas to numbers</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"phoneNumber" : {
2024-07-04 17:47:56 +02:00
"args" : [
"num"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ phoneNumber 8005551212 }} -> (800) 555-1212" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Convert a string or number to a formatted phone number.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"toAbbr" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number" ,
"precision"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ toAbbr 10123 2 }} -> 10.12k" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Abbreviate numbers to the given number of <code>precision</code>. This for general numbers, not size in bytes.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"toExponential" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number" ,
"fractionDigits"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ toExponential 10123 2 }} -> 1.01e+4" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns a string representing the given number in exponential notation.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"toFixed" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number" ,
"digits"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-02-02 18:29:46 +01:00
"example" : "{{ toFixed 1.1234 2 }} -> 1.12" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Formats the given number using fixed-point notation.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"toFloat" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Convert input to a float.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"toInt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Convert input to an integer.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"toPrecision" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number" ,
"precision"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-26 13:11:25 +01:00
"example" : "{{toPrecision '1.1234' 2}} -> 1.1" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns a string representing the <code>Number</code> object to the specified precision.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
}
} ,
"url" : {
"encodeURI" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ encodeURI 'https://myurl?Hello There' }} -> https%3A%2F%2Fmyurl%3FHello%20There" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"escape" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ escape 'https://myurl?Hello+There' }} -> https%3A%2F%2Fmyurl%3FHello%2BThere" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"decodeURI" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ decodeURI 'https://myurl?Hello%20There' }} -> https://myurl?Hello There" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Decode a Uniform Resource Identifier (URI) component.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"urlResolve" : {
2024-07-04 17:47:56 +02:00
"args" : [
"base" ,
"href"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{ urlResolve 'https://myurl' '/api/test' }} -> https://myurl/api/test" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"urlParse" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{ urlParse 'https://myurl/api/test' }}" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Parses a <code>url</code> string into an object.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"stripQuerystring" : {
2024-07-04 17:47:56 +02:00
"args" : [
"url"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ stripQuerystring 'https://myurl/api/test?foo=bar' }} -> 'https://myurl/api/test'" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Strip the query string from the given <code>url</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"stripProtocol" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ stripProtocol 'https://myurl/api/test' }} -> '//myurl/api/test'" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Strip protocol from a <code>url</code>. Useful for displaying media that may have an 'http' protocol on secure connections.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
}
} ,
"string" : {
"append" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"suffix"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{append 'index' '.html'}} -> index.html" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Append the specified <code>suffix</code> to the given string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"camelcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{camelcase 'foo bar baz'}} -> fooBarBaz" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>camelCase the characters in the given <code>string</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"capitalize" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{capitalize 'foo bar baz'}} -> Foo bar baz" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Capitalize the first word in a sentence.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"capitalizeAll" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{ capitalizeAll 'foo bar baz'}} -> Foo Bar Baz" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Capitalize all words in a string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"center" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"spaces"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{ center 'test' 1}} -> ' test '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Center a string using non-breaking spaces</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"chop" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ chop ' ABC '}} -> ABC" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"dashcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{dashcase 'a-b-c d_e'}} -> a-b-c-d-e" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>dash-case the characters in <code>string</code>. Replaces non-word characters and periods with hyphens.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"dotcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{dotcase 'a-b-c d_e'}} -> a.b.c.d.e" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>dot.case the characters in <code>string</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"downcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{downcase 'aBcDeF'}} -> abcdef" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Lowercase all of the characters in the given string. Alias for <a href=\"#lowercase\">lowercase</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"ellipsis" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"length"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{ellipsis 'foo bar baz' 7}} -> foo bar…" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Truncates a string to the specified <code>length</code>, and appends it with an elipsis, <code>…</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"hyphenate" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{hyphenate 'foo bar baz qux'}} -> foo-bar-baz-qux" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Replace spaces in a string with hyphens.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"isString" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{isString 'foo'}} -> true" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return true if <code>value</code> is a string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"lowercase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{lowercase 'Foo BAR baZ'}} -> foo bar baz" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Lowercase all characters in the given string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"occurrences" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"substring"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{occurrences 'foo bar foo bar baz' 'foo'}} -> 2" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return the number of occurrences of <code>substring</code> within the given <code>string</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"pascalcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{pascalcase 'foo bar baz'}} -> FooBarBaz" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>PascalCase the characters in <code>string</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"pathcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{pathcase 'a-b-c d_e'}} -> a/b/c/d/e" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>path/case the characters in <code>string</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"plusify" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{plusify 'foo bar baz'}} -> foo+bar+baz" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Replace spaces in the given string with pluses.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"prepend" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"prefix"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{prepend 'bar' 'foo-'}} -> foo-bar" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Prepends the given <code>string</code> with the specified <code>prefix</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"remove" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"substring"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{remove 'a b a b a b' 'a '}} -> b b b" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Remove all occurrences of <code>substring</code> from the given <code>str</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"removeFirst" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"substring"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{removeFirst 'a b a b a b' 'a'}} -> ' b a b a b'" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Remove the first occurrence of <code>substring</code> from the given <code>str</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"replace" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2021-10-05 13:14:29 +02:00
"example" : "{{replace 'a b a b a b' 'a' 'z'}} -> z b z b z b" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Replace all occurrences of substring <code>a</code> with substring <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"replaceFirst" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"a" ,
"b"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{replaceFirst 'a b a b a b' 'a' 'z'}} -> z b a b a b" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Replace the first occurrence of substring <code>a</code> with substring <code>b</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"sentence" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{sentence 'hello world. goodbye world.'}} -> Hello world. Goodbye world." ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Sentence case the given string</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"snakecase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{snakecase 'a-b-c d_e'}} -> a_b_c_d_e" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>snake_case the characters in the given <code>string</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"split" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{split 'a,b,c'}} -> ['a', 'b', 'c']" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Split <code>string</code> by the given <code>character</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"startsWith" : {
2024-07-04 17:47:56 +02:00
"args" : [
"prefix" ,
"testString" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#startsWith 'Goodbye' 'Hello, world!'}}Yep{{else}}Nope{{/startsWith}} -> Nope" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Tests whether a string begins with the given prefix.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"titleize" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{titleize 'this is title case' }} -> This Is Title Case" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Title case the given string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"trim" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{trim ' ABC ' }} -> ABC" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Removes extraneous whitespace from the beginning and end of a string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"trimLeft" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{trimLeft ' ABC ' }} -> 'ABC '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Removes extraneous whitespace from the beginning of a string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"trimRight" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2024-01-23 16:12:53 +01:00
"example" : "{{trimRight ' ABC ' }} -> ' ABC'" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Removes extraneous whitespace from the end of a string.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"truncate" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"limit" ,
"suffix"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2021-10-05 13:14:29 +02:00
"example" : "{{truncate 'foo bar baz' 7 }} -> foo bar" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Truncate a string to the specified <code>length</code>. Also see <a href=\"#ellipsis\">ellipsis</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"truncateWords" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"limit" ,
"suffix"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{truncateWords 'foo bar baz' 1 }} -> foo…" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Truncate a string to have the specified number of words. Also see <a href=\"#truncate\">truncate</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"upcase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 1 ,
2021-10-05 13:14:29 +02:00
"example" : "{{upcase 'aBcDef'}} -> ABCDEF" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Uppercase all of the characters in the given string. Alias for <a href=\"#uppercase\">uppercase</a>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"uppercase" : {
2024-07-04 17:47:56 +02:00
"args" : [
"str" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{uppercase 'aBcDef'}} -> ABCDEF" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:54:00 +01:00
"requiresBlock" : false
2024-07-04 17:56:25 +02:00
} ,
"lorem" : {
"args" : [
"num"
] ,
"numArgs" : 1 ,
"example" : "{{lorem 11}} -> Lorem ipsum" ,
"description" : "<p>Takes a number and returns that many charaters of Lorem Ipsum</p>\n" ,
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
}
} ,
"comparison" : {
"and" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#and great magnificent}}both{{else}}no{{/and}} -> no" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"compare" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"operator" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 4 ,
2024-01-23 16:12:53 +01:00
"example" : "{{compare 10 '<' 5 }} -> false" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:54:00 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"contains" : {
2024-07-04 17:47:56 +02:00
"args" : [
"collection" ,
"value" ,
"[startIndex=0]" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 4 ,
2024-01-26 13:11:25 +01:00
"example" : "{{#contains ['a', 'b', 'c'] 'd'}} This will not be rendered. {{else}} This will be rendered. {{/contains}} -> ' This will be rendered. '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"default" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value" ,
"defaultValue"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{default null null 'default'}} -> default" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns the first value that is not undefined, otherwise the 'default' value is returned.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"eq" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#eq 3 3}}equal{{else}}not equal{{/eq}} -> equal" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"gt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#gt 4 3}} greater than{{else}} not greater than{{/gt}} -> ' greater than'" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"gte" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#gte 4 3}} greater than or equal{{else}} not greater than{{/gte}} -> ' greater than or equal'" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"has" : {
2024-07-04 17:47:56 +02:00
"args" : [
"val" ,
"pattern" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#has 'foobar' 'foo'}}has it{{else}}doesn't{{/has}} -> has it" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"isFalsey" : {
2024-07-04 17:47:56 +02:00
"args" : [
"val" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{isFalsey '' }} -> true" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"isTruthy" : {
2024-07-04 17:47:56 +02:00
"args" : [
"val" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-10-05 13:14:29 +02:00
"example" : "{{isTruthy '12' }} -> true" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-01-27 19:09:04 +01:00
} ,
"ifEven" : {
2024-07-04 17:47:56 +02:00
"args" : [
"number" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#ifEven 2}} even {{else}} odd {{/ifEven}} -> ' even '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return true if the given value is an even number.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"ifNth" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#ifNth 2 10}}remainder{{else}}no remainder{{/ifNth}} -> remainder" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Conditionally renders a block if the remainder is zero when <code>b</code> operand is divided by <code>a</code>. If an inverse block is specified it will be rendered when the remainder is <strong>not zero</strong>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"ifOdd" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#ifOdd 3}}odd{{else}}even{{/ifOdd}} -> odd" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"is" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#is 3 3}} is {{else}} is not {{/is}} -> ' is '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"isnt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#isnt 3 3}} isnt {{else}} is {{/isnt}} -> ' is '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"lt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"context" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#lt 2 3}} less than {{else}} more than or equal {{/lt}} -> ' less than '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"lte" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#lte 2 3}} less than or equal {{else}} more than {{/lte}} -> ' less than or equal '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"neither" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#neither null null}}both falsey{{else}}both not falsey{{/neither}} -> both falsey" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"not" : {
2024-07-04 17:47:56 +02:00
"args" : [
"val" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#not undefined }}falsey{{else}}not falsey{{/not}} -> falsey" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Returns true if <code>val</code> is falsey. Works as a block or inline helper.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"or" : {
2024-07-04 17:47:56 +02:00
"args" : [
"arguments" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#or 1 2 undefined }} at least one truthy {{else}} all falsey {{/or}} -> ' at least one truthy '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"unlessEq" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#unlessEq 2 1 }} not equal {{else}} equal {{/unlessEq}} -> ' not equal '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is equal to <code>b</code></strong>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"unlessGt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#unlessGt 20 1 }} not greater than {{else}} greater than {{/unlessGt}} -> ' greater than '" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than <code>b</code></strong>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"unlessLt" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#unlessLt 20 1 }}greater than or equal{{else}}less than{{/unlessLt}} -> greater than or equal" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than <code>b</code></strong>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"unlessGteq" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#unlessGteq 20 1 }} less than {{else}}greater than or equal to{{/unlessGteq}} -> greater than or equal to" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
} ,
"unlessLteq" : {
2024-07-04 17:47:56 +02:00
"args" : [
"a" ,
"b" ,
"options"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 3 ,
2024-01-23 16:12:53 +01:00
"example" : "{{#unlessLteq 20 1 }} greater than {{else}} less than or equal to {{/unlessLteq}} -> ' greater than '" ,
2024-01-30 10:20:52 +01:00
"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" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-01-27 19:09:04 +01:00
}
} ,
2021-09-16 22:15:09 +02:00
"object" : {
"extend" : {
2024-07-04 17:47:56 +02:00
"args" : [
"objects"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Extend the context with the properties of other objects. A shallow merge is performed to avoid mutating the context.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"forIn" : {
2024-07-04 17:47:56 +02:00
"args" : [
"context" ,
"options"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 2 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that iterates over the properties of an object, exposing each key and value on the context.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-09-16 22:15:09 +02:00
} ,
"forOwn" : {
2024-07-04 17:47:56 +02:00
"args" : [
"obj" ,
"options"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 2 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Block helper that iterates over the <strong>own</strong> properties of an object, exposing each key and value on the context.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-09-16 22:15:09 +02:00
} ,
"toPath" : {
2024-07-04 17:47:56 +02:00
"args" : [
"prop"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Take arguments and, if they are string or number, convert them to a dot-delineated object property path.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"get" : {
2024-07-04 17:47:56 +02:00
"args" : [
"prop" ,
"context" ,
"options"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 3 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Use property paths (<code>a.b.c</code>) to get a value or nested value from the context. Works as a regular helper or block helper.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-09-16 22:15:09 +02:00
} ,
"getObject" : {
2024-07-04 17:47:56 +02:00
"args" : [
"prop" ,
"context"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 2 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Use property paths (<code>a.b.c</code>) to get an object from the context. Differs from the <code>get</code> helper in that this helper will return the actual object, including the given property key. Also, this helper does not work as a block helper.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"hasOwn" : {
2024-07-04 17:47:56 +02:00
"args" : [
"key" ,
"context"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 2 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return true if <code>key</code> is an own, enumerable property of the given <code>context</code> object.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"isObject" : {
2024-07-04 17:47:56 +02:00
"args" : [
"value"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Return true if <code>value</code> is an object.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"JSONparse" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Parses the given string using <code>JSON.parse</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-09-16 22:15:09 +02:00
} ,
"JSONstringify" : {
2024-07-04 17:47:56 +02:00
"args" : [
"obj"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Stringify an object using <code>JSON.stringify</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"merge" : {
2024-07-04 17:47:56 +02:00
"args" : [
"object" ,
"objects"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 2 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Deeply merge the properties of the given <code>objects</code> with the context object.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
} ,
"parseJSON" : {
2024-07-04 17:47:56 +02:00
"args" : [
"string"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Parses the given string using <code>JSON.parse</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-09-16 22:15:09 +02:00
} ,
"pick" : {
2024-07-04 17:47:56 +02:00
"args" : [
"properties" ,
"context" ,
"options"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 3 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Pick properties from the context object.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : true
2021-09-16 22:15:09 +02:00
} ,
"stringify" : {
2024-07-04 17:47:56 +02:00
"args" : [
"obj"
] ,
2021-09-16 22:15:09 +02:00
"numArgs" : 1 ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Stringify an object using <code>JSON.stringify</code>.</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2021-09-16 22:15:09 +02:00
}
} ,
2023-12-13 18:56:16 +01:00
"uuid" : {
"uuid" : {
"args" : [ ] ,
"numArgs" : 0 ,
"example" : "{{ uuid }} -> f34ebc66-93bd-4f7c-b79b-92b5569138bc" ,
2024-01-30 10:20:52 +01:00
"description" : "<p>Generates a UUID, using the V4 method (identical to the browser crypto.randomUUID function).</p>\n" ,
2024-01-30 15:49:18 +01:00
"requiresBlock" : false
2023-12-13 18:56:16 +01:00
}
} ,
2021-01-27 19:09:04 +01:00
"date" : {
"date" : {
2024-07-04 17:47:56 +02:00
"args" : [
"datetime" ,
"format"
] ,
2021-01-27 19:09:04 +01:00
"numArgs" : 2 ,
2021-06-10 14:44:44 +02:00
"example" : "{{date now \"DD-MM-YYYY\" \"America/New_York\" }} -> 21-01-2021" ,
"description" : "<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>\n"
2021-02-04 11:25:04 +01:00
} ,
"duration" : {
2024-07-04 17:47:56 +02:00
"args" : [
"time" ,
"durationType"
] ,
2021-02-04 11:25:04 +01:00
"numArgs" : 2 ,
2024-01-19 14:05:35 +01:00
"example" : "{{duration 8 \"seconds\"}} -> a few seconds" ,
2021-02-04 11:25:04 +01:00
"description" : "<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"
2021-01-27 19:09:04 +01:00
}
}
2024-07-04 17:47:56 +02:00
}