Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Fix yui compression (fix #1035)

Travis Jeffery30ba8f58496a
diff --git a/lib/ms.js b/lib/ms.js
index c5847f8d..40966374 100644
--- a/lib/ms.js
+++ b/lib/ms.js
@@ -24,9 +24,7 @@ var y = d * 365.25;
module.exports = function(val, options){
options = options || {};
if ('string' == typeof val) return parse(val);
- return options.long
- ? long(val)
- : short(val);
+ return options.long ? longFormat(val) : shortFormat(val);
};
/**
@@ -76,7 +74,7 @@ function parse(str) {
* @api private
*/
-function short(ms) {
+function shortFormat(ms) {
if (ms >= d) return Math.round(ms / d) + 'd';
if (ms >= h) return Math.round(ms / h) + 'h';
if (ms >= m) return Math.round(ms / m) + 'm';
@@ -92,7 +90,7 @@ function short(ms) {
* @api private
*/
-function long(ms) {
+function longFormat(ms) {
return plural(ms, d, 'day')
|| plural(ms, h, 'hour')
|| plural(ms, m, 'minute')