MCPcopy Create free account
hub / github.com/LearnBoost/cluster / unit

Function unit

lib/utils.js:72–74  ·  view source on GitHub ↗
(name, n)

Source from the content-addressed store, hash-verified

70 , day = hour * 24;
71
72 function unit(name, n) {
73 return n + ' ' + name + (1 == n ? '' : 's');
74 }
75
76 if (diff < second) return unit('millisecond', diff);
77 if (diff < minute) return unit('second', (diff / second).toFixed(0));

Callers 1

utils.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected