UNPKG

xplora

Version:

Xplora is a command-line tool to visualize files & directories on your file system and output them into a hierarchical tree. Xplora also comes with many other great features.

20 lines (17 loc) 361 B
"use strict"; /** * Humanize time. * * @param {number} time duration in millisecond. * @returns */ function calculateTime(time) { if (time / 1000 > 60) { return Math.ceil(time / 1000 / 60) + " min"; } if (time > 1000) { return Math.ceil(time / 1000) + " sec"; } return time + " ms"; } module.exports = calculateTime;