source: trip-planner-front/node_modules/humanize-ms/index.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 442 bytes
Line 
1/*!
2 * humanize-ms - index.js
3 * Copyright(c) 2014 dead_horse <dead_horse@qq.com>
4 * MIT Licensed
5 */
6
7'use strict';
8
9/**
10 * Module dependencies.
11 */
12
13var util = require('util');
14var ms = require('ms');
15
16module.exports = function (t) {
17 if (typeof t === 'number') return t;
18 var r = ms(t);
19 if (r === undefined) {
20 var err = new Error(util.format('humanize-ms(%j) result undefined', t));
21 console.warn(err.stack);
22 }
23 return r;
24};
Note: See TracBrowser for help on using the repository browser.