UNPKG

@utilify/core

Version:

Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B

11 lines 511 B
type DateFormat = "timestamp" | "string" | "utc" | "iso"; /** * Converts a Date object to a string or number in the specified format. * @param {Date} date - The date to convert. * @param {DateFormat} [format="iso"] - The format ("timestamp", "string", "utc", "iso"). * @returns {string|number} The converted value. * @throws {TypeError} If date is not valid. */ export default function convertDateTo(date: Date, format?: DateFormat): string | number; export {}; //# sourceMappingURL=convertDateTo.d.ts.map