🎉 Initial commit

This commit is contained in:
Simon Schneegans
2020-08-15 12:02:21 +02:00
parent b8f4f17c5a
commit ed18a71a87
364 changed files with 87551 additions and 2 deletions

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,
});
}