forked from mirrors/action-gh-release
setup integration test
This commit is contained in:
parent
1a522d88d8
commit
845942e04a
555 changed files with 103819 additions and 1 deletions
16
node_modules/@octokit/endpoint/dist-src/util/merge-deep.js
generated
vendored
Normal file
16
node_modules/@octokit/endpoint/dist-src/util/merge-deep.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
import isPlainObject from "is-plain-object";
|
||||
export 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue