@budibase/string-templates 2.15.5 → 2.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -137,7 +137,7 @@
137
137
  "n"
138
138
  ],
139
139
  "numArgs": 2,
140
- "example": "{{ after [1, 2, 3] 1}} -> [3]",
140
+ "example": "{{ after ['a', 'b', 'c', 'd'] 2}} -> ['c', 'd']",
141
141
  "description": "<p>Returns all of the items in an array after the specified index. Opposite of <a href=\"#before\">before</a>.</p>\n"
142
142
  },
143
143
  "arrayify": {
@@ -154,7 +154,7 @@
154
154
  "n"
155
155
  ],
156
156
  "numArgs": 2,
157
- "example": "{{ before [1, 2, 3] 2}} -> [1, 2]",
157
+ "example": "{{ before ['a', 'b', 'c', 'd'] 3}} -> ['a', 'b']",
158
158
  "description": "<p>Return all of the items in the collection before the specified count. Opposite of <a href=\"#after\">after</a>.</p>\n"
159
159
  },
160
160
  "eachIndex": {
@@ -182,7 +182,7 @@
182
182
  "n"
183
183
  ],
184
184
  "numArgs": 2,
185
- "example": "{{first [1, 2, 3, 4] 2}} -> [1, 2]",
185
+ "example": "{{first [1, 2, 3, 4] 2}} -> 1,2",
186
186
  "description": "<p>Returns the first item, or first <code>n</code> items of an array.</p>\n"
187
187
  },
188
188
  "forEach": {
@@ -200,7 +200,7 @@
200
200
  "options"
201
201
  ],
202
202
  "numArgs": 3,
203
- "example": "{{#inArray [1, 2, 3] 2}} 2 exists {{else}} 2 does not exist {{/inArray}} -> 2 exists",
203
+ "example": "{{#inArray [1, 2, 3] 2}} 2 exists {{else}} 2 does not exist {{/inArray}} -> ' 2 exists '",
204
204
  "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"
205
205
  },
206
206
  "isArray": {
@@ -226,7 +226,7 @@
226
226
  "separator"
227
227
  ],
228
228
  "numArgs": 2,
229
- "example": "{{join [1, 2, 3]}} -> '1, 2, 3'",
229
+ "example": "{{join [1, 2, 3]}} -> 1, 2, 3",
230
230
  "description": "<p>Join all elements of array into a string, optionally using a given separator.</p>\n"
231
231
  },
232
232
  "equalsLength": {
@@ -236,7 +236,7 @@
236
236
  "options"
237
237
  ],
238
238
  "numArgs": 3,
239
- "example": "{{equalsLength '[1,2,3]' 3}} -> true",
239
+ "example": "{{equalsLength [1, 2, 3] 3}} -> true",
240
240
  "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"
241
241
  },
242
242
  "last": {
@@ -253,7 +253,7 @@
253
253
  "value"
254
254
  ],
255
255
  "numArgs": 1,
256
- "example": "{{length '[1, 2, 3]'}} -> 3",
256
+ "example": "{{length [1, 2, 3]}} -> 3",
257
257
  "description": "<p>Returns the length of the given string or array.</p>\n"
258
258
  },
259
259
  "lengthEqual": {
@@ -263,7 +263,7 @@
263
263
  "options"
264
264
  ],
265
265
  "numArgs": 3,
266
- "example": "{{equalsLength '[1,2,3]' 3}} -> true",
266
+ "example": "{{equalsLength [1, 2, 3] 3}} -> true",
267
267
  "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"
268
268
  },
269
269
  "map": {
@@ -299,7 +299,7 @@
299
299
  "provided"
300
300
  ],
301
301
  "numArgs": 3,
302
- "example": "{{#some [1, 'b', 3] isString}} string found {{else}} No string found {{/some}} -> string found",
302
+ "example": "{{#some [1, \"b\", 3] isString}} string found {{else}} No string found {{/some}} -> ' string found '",
303
303
  "description": "<p>Block helper that returns the block if the callback returns true for some value in the given array.</p>\n"
304
304
  },
305
305
  "sort": {
@@ -317,7 +317,7 @@
317
317
  "props"
318
318
  ],
319
319
  "numArgs": 2,
320
- "example": "{{ sortBy [{a: 'zzz'}, {a: 'aaa'}] 'a' }} -> [{'a':'aaa'}, {'a':'zzz'}]",
320
+ "example": "{{ sortBy [{'a': 'zzz'}, {'a': 'aaa'}] 'a' }} -> [{'a':'aaa'},{'a':'zzz'}]",
321
321
  "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"
322
322
  },
323
323
  "withAfter": {
@@ -347,7 +347,7 @@
347
347
  "options"
348
348
  ],
349
349
  "numArgs": 3,
350
- "example": "{{ withFirst [1, 2, 3] }} {{this}} {{/withFirst}}",
350
+ "example": "{{#withFirst [1, 2, 3] }}{{this}}{{/withFirst}} -> 1",
351
351
  "description": "<p>Use the first item in a collection inside a handlebars block expression. Opposite of <a href=\"#withLast\">withLast</a>.</p>\n"
352
352
  },
353
353
  "withGroup": {
@@ -357,7 +357,7 @@
357
357
  "options"
358
358
  ],
359
359
  "numArgs": 3,
360
- "example": "{{#withGroup [1, 2, 3, 4] 2}} {{#each this}} {{.}} {{each}} <br> {{/withGroup}} -> 1,2<br> 3,4<br>",
360
+ "example": "{{#withGroup [1, 2, 3, 4] 2}}{{#each this}}{{.}}{{/each}}<br>{{/withGroup}} -> 12<br>34<br>",
361
361
  "description": "<p>Block helper that groups array elements by given group <code>size</code>.</p>\n"
362
362
  },
363
363
  "withLast": {
@@ -367,7 +367,7 @@
367
367
  "options"
368
368
  ],
369
369
  "numArgs": 3,
370
- "example": "{{#withLast [1, 2, 3, 4]}} {{this}} {{/withLast}} -> 4",
370
+ "example": "{{#withLast [1, 2, 3, 4]}}{{this}}{{/withLast}} -> 4",
371
371
  "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"
372
372
  },
373
373
  "withSort": {
@@ -377,7 +377,7 @@
377
377
  "options"
378
378
  ],
379
379
  "numArgs": 3,
380
- "example": "{{#withSort ['b', 'a', 'c']}} {{this}} {{/withSort}} -> abc",
380
+ "example": "{{#withSort ['b', 'a', 'c']}}{{this}}{{/withSort}} -> abc",
381
381
  "description": "<p>Block helper that sorts a collection and exposes the sorted collection as context inside the block.</p>\n"
382
382
  },
383
383
  "unique": {
@@ -386,7 +386,7 @@
386
386
  "options"
387
387
  ],
388
388
  "numArgs": 2,
389
- "example": "{{#each (unique ['a', 'a', 'c', 'b', 'e', 'e']) }} {{.}} {{/each}} -> acbe",
389
+ "example": "{{#each (unique ['a', 'a', 'c', 'b', 'e', 'e']) }}{{.}}{{/each}} -> acbe",
390
390
  "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"
391
391
  }
392
392
  },
@@ -396,7 +396,7 @@
396
396
  "number"
397
397
  ],
398
398
  "numArgs": 1,
399
- "example": "{{ bytes 1386 }} -> 1.4Kb",
399
+ "example": "{{ bytes 1386 1 }} -> 1.4 kB",
400
400
  "description": "<p>Format a number to it&#39;s equivalent in bytes. If a string is passed, it&#39;s length will be formatted and returned. <strong>Examples:</strong> - <code>&#39;foo&#39; =&gt; 3 B</code> - <code>13661855 =&gt; 13.66 MB</code> - <code>825399 =&gt; 825.39 kB</code> - <code>1396 =&gt; 1.4 kB</code></p>\n"
401
401
  },
402
402
  "addCommas": {
@@ -430,7 +430,7 @@
430
430
  "fractionDigits"
431
431
  ],
432
432
  "numArgs": 2,
433
- "example": "{{ toExponential 10123 2 }} -> 101e+4",
433
+ "example": "{{ toExponential 10123 2 }} -> 1.01e+4",
434
434
  "description": "<p>Returns a string representing the given number in exponential notation.</p>\n"
435
435
  },
436
436
  "toFixed": {
@@ -472,7 +472,7 @@
472
472
  "str"
473
473
  ],
474
474
  "numArgs": 1,
475
- "example": "{{ encodeURI 'https://myurl?Hello There' }} -> https://myurl?Hello%20There",
475
+ "example": "{{ encodeURI 'https://myurl?Hello There' }} -> https%3A%2F%2Fmyurl%3FHello%20There",
476
476
  "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"
477
477
  },
478
478
  "escape": {
@@ -480,7 +480,7 @@
480
480
  "str"
481
481
  ],
482
482
  "numArgs": 1,
483
- "example": "{{ escape 'https://myurl?Hello+There' }} -> https://myurl?Hello%20There",
483
+ "example": "{{ escape 'https://myurl?Hello+There' }} -> https%3A%2F%2Fmyurl%3FHello%2BThere",
484
484
  "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"
485
485
  },
486
486
  "decodeURI": {
@@ -488,7 +488,7 @@
488
488
  "str"
489
489
  ],
490
490
  "numArgs": 1,
491
- "example": "{{ decodeURI 'https://myurl?Hello%20There' }} -> https://myurl?=Hello There",
491
+ "example": "{{ decodeURI 'https://myurl?Hello%20There' }} -> https://myurl?Hello There",
492
492
  "description": "<p>Decode a Uniform Resource Identifier (URI) component.</p>\n"
493
493
  },
494
494
  "urlResolve": {
@@ -513,7 +513,7 @@
513
513
  "url"
514
514
  ],
515
515
  "numArgs": 1,
516
- "example": "{{ stripQueryString 'https://myurl/api/test?foo=bar' }} -> 'https://myurl/api/test'",
516
+ "example": "{{ stripQuerystring 'https://myurl/api/test?foo=bar' }} -> 'https://myurl/api/test'",
517
517
  "description": "<p>Strip the query string from the given <code>url</code>.</p>\n"
518
518
  },
519
519
  "stripProtocol": {
@@ -521,7 +521,7 @@
521
521
  "str"
522
522
  ],
523
523
  "numArgs": 1,
524
- "example": "{{ stripProtocol 'https://myurl/api/test' }} -> 'myurl/api/test'",
524
+ "example": "{{ stripProtocol 'https://myurl/api/test' }} -> '//myurl/api/test'",
525
525
  "description": "<p>Strip protocol from a <code>url</code>. Useful for displaying media that may have an &#39;http&#39; protocol on secure connections.</p>\n"
526
526
  }
527
527
  },
@@ -573,7 +573,7 @@
573
573
  "string"
574
574
  ],
575
575
  "numArgs": 1,
576
- "example": "{{ chop ' ABC '}} -> 'ABC'",
576
+ "example": "{{ chop ' ABC '}} -> ABC",
577
577
  "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"
578
578
  },
579
579
  "dashcase": {
@@ -606,7 +606,7 @@
606
606
  "length"
607
607
  ],
608
608
  "numArgs": 2,
609
- "example": "{{ellipsis 'foo bar baz', 7}} -> foo bar…",
609
+ "example": "{{ellipsis 'foo bar baz' 7}} -> foo bar…",
610
610
  "description": "<p>Truncates a string to the specified <code>length</code>, and appends it with an elipsis, <code>…</code>.</p>\n"
611
611
  },
612
612
  "hyphenate": {
@@ -675,14 +675,6 @@
675
675
  "example": "{{prepend 'bar' 'foo-'}} -> foo-bar",
676
676
  "description": "<p>Prepends the given <code>string</code> with the specified <code>prefix</code>.</p>\n"
677
677
  },
678
- "raw": {
679
- "args": [
680
- "options"
681
- ],
682
- "numArgs": 1,
683
- "example": "{{{{#raw}}}} {{foo}} {{{{/raw}}}} -> {{foo}}",
684
- "description": "<p>Render a block without processing mustache templates inside the block.</p>\n"
685
- },
686
678
  "remove": {
687
679
  "args": [
688
680
  "str",
@@ -698,7 +690,7 @@
698
690
  "substring"
699
691
  ],
700
692
  "numArgs": 2,
701
- "example": "{{remove 'a b a b a b' 'a'}} -> b a b a b",
693
+ "example": "{{removeFirst 'a b a b a b' 'a'}} -> ' b a b a b'",
702
694
  "description": "<p>Remove the first occurrence of <code>substring</code> from the given <code>str</code>.</p>\n"
703
695
  },
704
696
  "replace": {
@@ -718,7 +710,7 @@
718
710
  "b"
719
711
  ],
720
712
  "numArgs": 3,
721
- "example": "{{replace 'a b a b a b' 'a' 'z'}} -> z b a b a b",
713
+ "example": "{{replaceFirst 'a b a b a b' 'a' 'z'}} -> z b a b a b",
722
714
  "description": "<p>Replace the first occurrence of substring <code>a</code> with substring <code>b</code>.</p>\n"
723
715
  },
724
716
  "sentence": {
@@ -752,7 +744,7 @@
752
744
  "options"
753
745
  ],
754
746
  "numArgs": 3,
755
- "example": "{{#startsWith 'Goodbye' 'Hello, world!'}} Yep {{else}} Nope {{/startsWith}} -> Nope",
747
+ "example": "{{#startsWith 'Goodbye' 'Hello, world!'}}Yep{{else}}Nope{{/startsWith}} -> Nope",
756
748
  "description": "<p>Tests whether a string begins with the given prefix.</p>\n"
757
749
  },
758
750
  "titleize": {
@@ -760,7 +752,7 @@
760
752
  "str"
761
753
  ],
762
754
  "numArgs": 1,
763
- "example": "{{#titleize 'this is title case' }} -> This Is Title Case",
755
+ "example": "{{titleize 'this is title case' }} -> This Is Title Case",
764
756
  "description": "<p>Title case the given string.</p>\n"
765
757
  },
766
758
  "trim": {
@@ -784,7 +776,7 @@
784
776
  "string"
785
777
  ],
786
778
  "numArgs": 1,
787
- "example": "{{trimRight ' ABC ' }} -> ' ABC '",
779
+ "example": "{{trimRight ' ABC ' }} -> ' ABC'",
788
780
  "description": "<p>Removes extraneous whitespace from the end of a string.</p>\n"
789
781
  },
790
782
  "truncate": {
@@ -804,7 +796,7 @@
804
796
  "suffix"
805
797
  ],
806
798
  "numArgs": 3,
807
- "example": "{{truncateWords 'foo bar baz' 1 }} -> foo",
799
+ "example": "{{truncateWords 'foo bar baz' 1 }} -> foo",
808
800
  "description": "<p>Truncate a string to have the specified number of words. Also see <a href=\"#truncate\">truncate</a>.</p>\n"
809
801
  },
810
802
  "upcase": {
@@ -844,7 +836,7 @@
844
836
  "options"
845
837
  ],
846
838
  "numArgs": 4,
847
- "example": "{{compare 10 '<' 5 }} -> true",
839
+ "example": "{{compare 10 '<' 5 }} -> false",
848
840
  "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"
849
841
  },
850
842
  "contains": {
@@ -874,7 +866,7 @@
874
866
  "options"
875
867
  ],
876
868
  "numArgs": 3,
877
- "example": "{{#eq 3 3}} equal{{else}} not equal{{/eq}} -> equal",
869
+ "example": "{{#eq 3 3}}equal{{else}}not equal{{/eq}} -> equal",
878
870
  "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=&#39;&#39;</code> hash argument for the second value.</p>\n"
879
871
  },
880
872
  "gt": {
@@ -884,7 +876,7 @@
884
876
  "options"
885
877
  ],
886
878
  "numArgs": 3,
887
- "example": "{{#gt 4 3}} greater than{{else}} not greater than{{/gt}} -> greater than",
879
+ "example": "{{#gt 4 3}} greater than{{else}} not greater than{{/gt}} -> ' greater than'",
888
880
  "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=&#39;&#39;</code> hash argument for the second value.</p>\n"
889
881
  },
890
882
  "gte": {
@@ -894,7 +886,7 @@
894
886
  "options"
895
887
  ],
896
888
  "numArgs": 3,
897
- "example": "{{#gte 4 3}} greater than or equal{{else}} not greater than{{/gte}} -> greater than or equal",
889
+ "example": "{{#gte 4 3}} greater than or equal{{else}} not greater than{{/gte}} -> ' greater than or equal'",
898
890
  "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=&#39;&#39;</code> hash argument for the second value.</p>\n"
899
891
  },
900
892
  "has": {
@@ -904,7 +896,7 @@
904
896
  "options"
905
897
  ],
906
898
  "numArgs": 3,
907
- "example": "{{#has 'foobar' 'foo'}} has it{{else}} doesn't{{/has}} -> has it",
899
+ "example": "{{#has 'foobar' 'foo'}}has it{{else}}doesn't{{/has}} -> has it",
908
900
  "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"
909
901
  },
910
902
  "isFalsey": {
@@ -931,7 +923,7 @@
931
923
  "options"
932
924
  ],
933
925
  "numArgs": 2,
934
- "example": "{{#ifEven 2}} even {{else}} odd {{/ifEven}} -> even",
926
+ "example": "{{#ifEven 2}} even {{else}} odd {{/ifEven}} -> ' even '",
935
927
  "description": "<p>Return true if the given value is an even number.</p>\n"
936
928
  },
937
929
  "ifNth": {
@@ -941,8 +933,8 @@
941
933
  "options"
942
934
  ],
943
935
  "numArgs": 3,
944
- "example": "{{#ifNth 10 2}} remainder {{else}} no remainder {{/ifNth}} -> remainder",
945
- "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"
936
+ "example": "{{#ifNth 2 10}}remainder{{else}}no remainder{{/ifNth}} -> remainder",
937
+ "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"
946
938
  },
947
939
  "ifOdd": {
948
940
  "args": [
@@ -950,7 +942,7 @@
950
942
  "options"
951
943
  ],
952
944
  "numArgs": 2,
953
- "example": "{{#ifOdd 3}} odd {{else}} even {{/ifOdd}} -> odd",
945
+ "example": "{{#ifOdd 3}}odd{{else}}even{{/ifOdd}} -> odd",
954
946
  "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"
955
947
  },
956
948
  "is": {
@@ -960,7 +952,7 @@
960
952
  "options"
961
953
  ],
962
954
  "numArgs": 3,
963
- "example": "{{#is 3 3}} is {{else}} is not {{/is}} -> is",
955
+ "example": "{{#is 3 3}} is {{else}} is not {{/is}} -> ' is '",
964
956
  "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"
965
957
  },
966
958
  "isnt": {
@@ -970,7 +962,7 @@
970
962
  "options"
971
963
  ],
972
964
  "numArgs": 3,
973
- "example": "{{#isnt 3 3}} isnt {{else}} is {{/isnt}} -> is",
965
+ "example": "{{#isnt 3 3}} isnt {{else}} is {{/isnt}} -> ' is '",
974
966
  "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"
975
967
  },
976
968
  "lt": {
@@ -979,7 +971,7 @@
979
971
  "options"
980
972
  ],
981
973
  "numArgs": 2,
982
- "example": "{{#lt 2 3}} less than {{else}} more than or equal {{/lt}} -> less than",
974
+ "example": "{{#lt 2 3}} less than {{else}} more than or equal {{/lt}} -> ' less than '",
983
975
  "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=&#39;&#39;</code> hash argument for the second value.</p>\n"
984
976
  },
985
977
  "lte": {
@@ -989,7 +981,7 @@
989
981
  "options"
990
982
  ],
991
983
  "numArgs": 3,
992
- "example": "{{#lte 2 3}} less than or equal {{else}} more than {{/lte}} -> less than or equal",
984
+ "example": "{{#lte 2 3}} less than or equal {{else}} more than {{/lte}} -> ' less than or equal '",
993
985
  "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=&#39;&#39;</code> hash argument for the second value.</p>\n"
994
986
  },
995
987
  "neither": {
@@ -999,7 +991,7 @@
999
991
  "options"
1000
992
  ],
1001
993
  "numArgs": 3,
1002
- "example": "{{#neither null null}} both falsey {{else}} both not falsey {{/neither}} -> both falsey",
994
+ "example": "{{#neither null null}}both falsey{{else}}both not falsey{{/neither}} -> both falsey",
1003
995
  "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"
1004
996
  },
1005
997
  "not": {
@@ -1008,7 +1000,7 @@
1008
1000
  "options"
1009
1001
  ],
1010
1002
  "numArgs": 2,
1011
- "example": "{{#not undefined }} falsey {{else}} not falsey {{/not}} -> falsey",
1003
+ "example": "{{#not undefined }}falsey{{else}}not falsey{{/not}} -> falsey",
1012
1004
  "description": "<p>Returns true if <code>val</code> is falsey. Works as a block or inline helper.</p>\n"
1013
1005
  },
1014
1006
  "or": {
@@ -1017,7 +1009,7 @@
1017
1009
  "options"
1018
1010
  ],
1019
1011
  "numArgs": 2,
1020
- "example": "{{#or 1 2 undefined }} at least one truthy {{else}} all falsey {{/or}} -> at least one truthy",
1012
+ "example": "{{#or 1 2 undefined }} at least one truthy {{else}} all falsey {{/or}} -> ' at least one truthy '",
1021
1013
  "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"
1022
1014
  },
1023
1015
  "unlessEq": {
@@ -1027,7 +1019,7 @@
1027
1019
  "options"
1028
1020
  ],
1029
1021
  "numArgs": 3,
1030
- "example": "{{#unlessEq 2 1 }} not equal {{else}} equal {{/unlessEq}} -> not equal",
1022
+ "example": "{{#unlessEq 2 1 }} not equal {{else}} equal {{/unlessEq}} -> ' not equal '",
1031
1023
  "description": "<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is equal to <code>b</code></strong>.</p>\n"
1032
1024
  },
1033
1025
  "unlessGt": {
@@ -1037,7 +1029,7 @@
1037
1029
  "options"
1038
1030
  ],
1039
1031
  "numArgs": 3,
1040
- "example": "{{#unlessGt 20 1 }} not greater than {{else}} greater than {{/unlessGt}} -> greater than",
1032
+ "example": "{{#unlessGt 20 1 }} not greater than {{else}} greater than {{/unlessGt}} -> ' greater than '",
1041
1033
  "description": "<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than <code>b</code></strong>.</p>\n"
1042
1034
  },
1043
1035
  "unlessLt": {
@@ -1047,7 +1039,7 @@
1047
1039
  "options"
1048
1040
  ],
1049
1041
  "numArgs": 3,
1050
- "example": "{{#unlessLt 20 1 }} greater than or equal {{else}} less than {{/unlessLt}} -> greater than or equal",
1042
+ "example": "{{#unlessLt 20 1 }}greater than or equal{{else}}less than{{/unlessLt}} -> greater than or equal",
1051
1043
  "description": "<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than <code>b</code></strong>.</p>\n"
1052
1044
  },
1053
1045
  "unlessGteq": {
@@ -1057,7 +1049,7 @@
1057
1049
  "options"
1058
1050
  ],
1059
1051
  "numArgs": 3,
1060
- "example": "{{#unlessGteq 20 1 }} less than {{else}} greater than or equal to {{/unlessGteq}} -> greater than or equal to",
1052
+ "example": "{{#unlessGteq 20 1 }} less than {{else}}greater than or equal to{{/unlessGteq}} -> greater than or equal to",
1061
1053
  "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"
1062
1054
  },
1063
1055
  "unlessLteq": {
@@ -1067,7 +1059,7 @@
1067
1059
  "options"
1068
1060
  ],
1069
1061
  "numArgs": 3,
1070
- "example": "{{#unlessLteq 20 1 }} greater than {{else}} less than or equal to {{/unlessLteq}} -> greater than",
1062
+ "example": "{{#unlessLteq 20 1 }} greater than {{else}} less than or equal to {{/unlessLteq}} -> ' greater than '",
1071
1063
  "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"
1072
1064
  }
1073
1065
  },
@@ -1204,7 +1196,7 @@
1204
1196
  "durationType"
1205
1197
  ],
1206
1198
  "numArgs": 2,
1207
- "example": "{{duration timeLeft \"seconds\"}} -> a few seconds",
1199
+ "example": "{{duration 8 \"seconds\"}} -> a few seconds",
1208
1200
  "description": "<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"
1209
1201
  }
1210
1202
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/string-templates",
3
- "version": "2.15.5",
3
+ "version": "2.15.6",
4
4
  "description": "Handlebars wrapper for Budibase templating.",
5
5
  "main": "src/index.cjs",
6
6
  "module": "dist/bundle.mjs",
@@ -25,7 +25,7 @@
25
25
  "manifest": "node ./scripts/gen-collection-info.js"
26
26
  },
27
27
  "dependencies": {
28
- "@budibase/handlebars-helpers": "^0.12.0",
28
+ "@budibase/handlebars-helpers": "^0.13.0",
29
29
  "dayjs": "^1.10.8",
30
30
  "handlebars": "^4.7.6",
31
31
  "lodash.clonedeep": "^4.5.0",
@@ -45,5 +45,5 @@
45
45
  "rollup-plugin-terser": "^7.0.2",
46
46
  "typescript": "5.2.2"
47
47
  },
48
- "gitHead": "3114adbe7a1287b4ed65935bddc0590d6905c140"
48
+ "gitHead": "307969d67826806a587a318f36266c9f3a33391e"
49
49
  }