UNPKG

@visulima/humanizer

Version:

Humanizer is a library for humanizing data in a human-readable form.

18 lines (15 loc) 605 B
import createDurationLanguage from './util/create-duration-language.mjs'; const durationLanguage = createDurationLanguage( (counter) => `ann${counter === 1 ? "o" : "i"}`, (counter) => `mes${counter === 1 ? "e" : "i"}`, (counter) => `settiman${counter === 1 ? "a" : "e"}`, (counter) => `giorn${counter === 1 ? "o" : "i"}`, (counter) => `or${counter === 1 ? "a" : "e"}`, (counter) => `minut${counter === 1 ? "o" : "i"}`, (counter) => `second${counter === 1 ? "o" : "i"}`, (counter) => `millisecond${counter === 1 ? "o" : "i"}`, "tra %s", "%s fa", "," ); export { durationLanguage };