@visulima/humanizer
Version:
Humanizer is a library for humanizing data in a human-readable form.
19 lines (16 loc) • 479 B
JavaScript
;
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const getCzechOrSlovakForm = /* @__PURE__ */ __name((counter) => {
if (counter === 1) {
return 0;
}
if (Math.floor(counter) !== counter) {
return 1;
}
if (counter % 10 >= 2 && counter % 10 <= 4 && counter % 100 < 10) {
return 2;
}
return 3;
}, "getCzechOrSlovakForm");
module.exports = getCzechOrSlovakForm;