mod-build 3.6.78 → 3.6.79-beta.2

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,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.79
4
+
5
+ - Adding a handlebars helper to see if the value is an array or not
6
+
3
7
  ## 3.6.78
4
8
 
5
9
  - Add functions to validate a contractor lead matches MQL criteria
@@ -19,7 +19,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
19
19
  // Checking for seasonal variations in the template.js + updating content
20
20
  var checkSeasonalVariations = require('./check-seasonal-variations.js');
21
21
  const activeSeason = checkSeasonalVariations();
22
- if (activeSeason.length !== 0){
22
+ if (activeSeason.length !== 0) {
23
23
  if (siteData.seasonalVariations) {
24
24
  activeSeason.forEach(season => {
25
25
  if (season in siteData.seasonalVariations) {
@@ -67,6 +67,13 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
67
67
  return handlebarsX(expression, this, options) ? options.fn(this) : options.inverse(this);
68
68
  }
69
69
  },
70
+ // Check if it is an array
71
+ {
72
+ name: 'isArrayOfObjects',
73
+ fn: function(expression) {
74
+ return Array.isArray(expression);
75
+ }
76
+ },
70
77
  // Reverse array
71
78
  {
72
79
  name: 'reverseArray',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.78",
3
+ "version": "3.6.79-beta.2",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",