mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
14 lines
482 B
JavaScript
14 lines
482 B
JavaScript
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),
|
|
parse,
|
|
});
|
|
}
|