code: function forEachKeyValue(obj, func) {
    Object.getOwnPropertyNames(obj).forEach(key => {
      let value;
      try {
        value = obj[key];
      } catch(_) {
        // This must be a non-accessible value, like "arguments" in Safari.
        return;
      }
      func(key, value);
    });
  }
docs: Loop over key/value pairs included in the given object, and call the provided
  function passing the key and the value.
  All non-accessible values are skipped.
  
  @param {Object} obj The object to introspect.
  @param {Function} func The function to execute for each key/value pair in the
  provided object, taking two arguments, the key and the value.