UNPKG

msw

Version:

Seamless REST/GraphQL API mocking library for browser and Node.js.

12 lines 445 B
function getTimestamp(options) { const now = /* @__PURE__ */ new Date(); const timestamp = `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}`; if (options?.milliseconds) { return `${timestamp}.${now.getMilliseconds().toString().padStart(3, "0")}`; } return timestamp; } export { getTimestamp }; //# sourceMappingURL=getTimestamp.mjs.map