static __registerFormat(format, target) {
    const { name, format: formatFn } = format;
    if (typeof name !== 'string')
      throw new Error("Can't register format; format.name must be a string");
    if (typeof formatFn !== 'function')
      throw new Error("Can't register format; format.format must be a function");
    this.deleteExistingHook(target, 'formats', name);

    // make sure to trigger the setter
    target.hooks = deepmerge(target.hooks, {
      formats: {
        [name]: formatFn,
      },
    });
    return target;
  }
@param  {Format} format
@param {typeof Register | Register} target