Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

251 B
Raw Blame
import msFn from "ms";

export const ms = (val: string) => {
  if (typeof val !== "string") {
    throw new Error("Date must be string");
  }

  try {
    return msFn(val);
  } catch {
    throw new Error(`Invalid date format string: ${val}`);
  }
};