const withMinimalDuration = async (wrappedPromise, durationMs) => {
  const [promiseResult] = await Promise.all([
    wrappedPromise,
    new Promise((_handler) => window.setTimeout(_handler, durationMs))
  ]);
  return promiseResult;
};

export { withMinimalDuration as w };
