MCPcopy
hub / github.com/FormidableLabs/webpack-dashboard / getTimeMessage

Function getTimeMessage

plugin/index.js:21–33  ·  view source on GitHub ↗
(timer)

Source from the content-addressed store, hash-verified

19function noop() {}
20
21function getTimeMessage(timer) {
22 let time = Date.now() - timer;
23
24 if (time >= ONE_SECOND) {
25 time /= ONE_SECOND;
26 time = Math.round(time);
27 time += "s";
28 } else {
29 time += "ms";
30 }
31
32 return ` (${time})`;
33}
34
35// Naive camel-casing.
36const camel = str => str.replace(/-([a-z])/, group => group[1].toUpperCase());

Callers 1

applyMethod · 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…