PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@lerna/github-client/node_modules/@octokit/endpoint/dist-src/util

Просмотр файла: merge-deep.js

import { isPlainObject } from "is-plain-object";
function mergeDeep(defaults, options) {
  const result = Object.assign({}, defaults);
  Object.keys(options).forEach((key) => {
    if (isPlainObject(options[key])) {
      if (!(key in defaults))
        Object.assign(result, { [key]: options[key] });
      else
        result[key] = mergeDeep(defaults[key], options[key]);
    } else {
      Object.assign(result, { [key]: options[key] });
    }
  });
  return result;
}
export {
  mergeDeep
};

Выполнить команду


Для локальной разработки. Не используйте в интернете!