setup-rust-action/node_modules/@octokit/endpoint/dist-src/with-defaults.js
Héctor Ramón Jiménez 7f8c3a27a4 Track node_modules
2019-08-15 19:37:37 +02:00

14 lines
481 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
});
}