MCPcopy
hub / github.com/vercel/ms / plural

Function plural

index.js:159–162  ·  view source on GitHub ↗

* Pluralization helper.

(ms, msAbs, n, name)

Source from the content-addressed store, hash-verified

157 */
158
159function plural(ms, msAbs, n, name) {
160 var isPlural = msAbs >= n * 1.5;
161 return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
162}

Callers 1

fmtLongFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…