mod-build 4.0.11 → 4.0.12

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 4.0.12
2
+
3
+ - Adding a handlebars helper to see if the value is an array or not
4
+
1
5
  ## 4.0.11
2
6
 
3
7
  - Adding the overflow on slide transition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.11",
3
+ "version": "4.0.12",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -59,6 +59,17 @@ export const handlebarsHelpers = [
59
59
  return handlebarsX(expression, this, options) ? options.fn(this) : options.inverse(this);
60
60
  }
61
61
  },
62
+ // Check if it is an array
63
+ {
64
+ name: 'isArray',
65
+ fn: function(expression, options) {
66
+ if (Array.isArray(expression)) {
67
+ return options.fn(expression);
68
+ } else {
69
+ return options.inverse(expression);
70
+ }
71
+ }
72
+ },
62
73
  // Reverse array
63
74
  {
64
75
  name: 'reverseArray',