function toInteger(value) {
  if (typeof value === "number") return Number.isFinite(value) ? value : 0;
  if (typeof value === "bigint") return Number(value);
  if (typeof value === "string") {
    const parsed = parseInt(value, 10);
    return Number.isFinite(parsed) ? parsed : 0;
  }
  return 0;
}
function toIntegerString(value) {
  if (typeof value === "bigint") return value.toString();
  if (typeof value === "number") return String(value);
  if (typeof value === "string") return value;
  return "0";
}
function toIsoString(value) {
  if (value instanceof Date) return value.toISOString();
  if (typeof value === "string" || typeof value === "number") {
    return new Date(value).toISOString();
  }
  throw new TypeError("Expected a Date-compatible value");
}
function toDateString(value) {
  if (value instanceof Date) return value.toISOString().slice(0, 10);
  return String(value);
}
export {
  toDateString,
  toInteger,
  toIntegerString,
  toIsoString
};
//# sourceMappingURL=usage-serialization.js.map
