GPR authentication support

This commit is contained in:
Alex Mullans authored and Alex Mullans committed 2019-10-03 16:35:25 -07:00
1 parent 6c0e2a2a6b
commit 6bd4969ec6
518 files changed
+95599 -2875

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
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
});
}