github-pages-deploy-action/node_modules/@octokit/endpoint/dist-src/with-defaults.js

14 lines
481 B
JavaScript
Raw Normal View History

2020-01-28 13:08:03 +08:00
import { endpointWithDefaults } from "./endpoint-with-defaults";
import { merge } from "./merge";
import { parse } from "./parse";
export function withDefaults(oldDefaults, newDefaults) {
const DEFAULTS = merge(oldDefaults, newDefaults);
const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
return Object.assign(endpoint, {
DEFAULTS,
defaults: withDefaults.bind(null, DEFAULTS),
merge: merge.bind(null, DEFAULTS),
2020-06-07 00:27:02 +08:00
parse
2020-01-28 13:08:03 +08:00
});
}