function iterateProperties(context, properties, fn, handleSpreadFn) {
  if (properties && properties.length && typeof fn === 'function') {
    for (let i = 0, j = properties.length; i < j; i++) {
      const node = properties[i];
      const key = astUtil.getKeyValue(context, node);

      if (node.type === 'ObjectTypeSpreadProperty' && typeof handleSpreadFn === 'function') {
        handleSpreadFn(node.argument);
      }

      const value = node.value;
      fn(key, value, node);
    }
  }
}
Iterates through a properties node, like a customized forEach.
@param {Object} context Array of properties to iterate.
@param {Object[]} properties Array of properties to iterate.
@param {Function} fn Function to call on each property, receives property key
    and property value. (key, value) => void
@param {Function} [handleSpreadFn] Function to call on each ObjectTypeSpreadProperty, receives the
    argument