@visulima/humanizer
Version:
Humanizer is a library for humanizing data in a human-readable form.
21 lines (16 loc) • 765 B
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const language_util_createDurationLanguage = require('./util/create-duration-language.cjs');
const durationLanguage = language_util_createDurationLanguage(
(counter) => `year${counter === 1 ? "" : "s"}`,
(counter) => `month${counter === 1 ? "" : "s"}`,
(counter) => `week${counter === 1 ? "" : "s"}`,
(counter) => `day${counter === 1 ? "" : "s"}`,
(counter) => `hour${counter === 1 ? "" : "s"}`,
(counter) => `minute${counter === 1 ? "" : "s"}`,
(counter) => `second${counter === 1 ? "" : "s"}`,
(counter) => `millisecond${counter === 1 ? "" : "s"}`,
"in %s",
"%s ago"
);
exports.durationLanguage = durationLanguage;