File tree 3 files changed +17
-3
lines changed
3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
2
- 1.0.1 / 2014-12-31
2
+ 1.2.0 / 2016-05-21
3
+ ==================
4
+
5
+ * feat: warn with stack
6
+
7
+ 1.1.0 / 2016-04-04
8
+ ==================
9
+
10
+ * deps: upgrade ms to 0.7.0
11
+
12
+ 1.0.1 / 2014-12-31
3
13
==================
4
14
5
15
* feat(index.js): warn when result is undefined
Original file line number Diff line number Diff line change 10
10
* Module dependencies.
11
11
*/
12
12
13
+ var util = require ( 'util' ) ;
13
14
var ms = require ( 'ms' ) ;
14
15
15
16
module . exports = function ( t ) {
16
17
if ( typeof t === 'number' ) return t ;
17
18
var r = ms ( t ) ;
18
- if ( r === undefined ) console . warn ( 'ms(%j) got undefined in %s' , t , __filename ) ;
19
+ if ( r === undefined ) {
20
+ var err = new Error ( util . format ( 'humanize-ms(%j) result undefined' , t ) ) ;
21
+ console . warn ( err . stack ) ;
22
+ }
19
23
return r ;
20
24
} ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " humanize-ms" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.2.0 " ,
4
4
"description" : " transform humanize time to ms" ,
5
5
"main" : " index.js" ,
6
6
"files" : [" index.js" ],
You can’t perform that action at this time.
0 commit comments