const funcify = (v) => () => v;

export function verify(config) {
  for (var k in config) {
    if (typeof config[k] !== "function")
      throw Error("All config options must be functions!");
  }
}

export function normalize(conf) {
  const config = { ...conf };
  for (var k in config) {
    if (typeof config[k] === "function") continue;
    config[k] = funcify(config[k]);
  }
  return config;
}
