@tryghost/helpers 1.1.64 → 1.1.67

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/cjs/helpers.js CHANGED
@@ -3514,17 +3514,17 @@ const filter = (items, visibility, fn) => {
3514
3514
  const returnByDefault = includes(visArray, defaultVisibility);
3515
3515
 
3516
3516
  // We don't want to change the structure of what is returned
3517
- return reduce(items, function (items, item, key) {
3517
+ return reduce(items, function (accumulator, item, key) {
3518
3518
  // If the item has visibility, check to see if it matches, else if there's no visibility check for a match with the default visibility
3519
3519
  if (includes(visArray, 'all') || item.visibility && includes(visArray, item.visibility) || !item.visibility && returnByDefault) {
3520
3520
  const newItem = fn ? fn(item) : item;
3521
3521
  if (isArray$1(items)) {
3522
- memo.push(newItem);
3522
+ accumulator.push(newItem);
3523
3523
  } else {
3524
- memo[key] = newItem;
3524
+ accumulator[key] = newItem;
3525
3525
  }
3526
3526
  }
3527
- return memo;
3527
+ return accumulator;
3528
3528
  }, memo);
3529
3529
  };
3530
3530
 
package/es/helpers.js CHANGED
@@ -3515,19 +3515,19 @@ var filter = function filter(items, visibility, fn) {
3515
3515
  var defaultVisibility = 'public';
3516
3516
  var returnByDefault = includes(visArray, defaultVisibility); // We don't want to change the structure of what is returned
3517
3517
 
3518
- return reduce(items, function (items, item, key) {
3518
+ return reduce(items, function (accumulator, item, key) {
3519
3519
  // If the item has visibility, check to see if it matches, else if there's no visibility check for a match with the default visibility
3520
3520
  if (includes(visArray, 'all') || item.visibility && includes(visArray, item.visibility) || !item.visibility && returnByDefault) {
3521
3521
  var newItem = fn ? fn(item) : item;
3522
3522
 
3523
3523
  if (isArray$1(items)) {
3524
- memo.push(newItem);
3524
+ accumulator.push(newItem);
3525
3525
  } else {
3526
- memo[key] = newItem;
3526
+ accumulator[key] = newItem;
3527
3527
  }
3528
3528
  }
3529
3529
 
3530
- return memo;
3530
+ return accumulator;
3531
3531
  }, memo);
3532
3532
  };
3533
3533