Skip to content

Commit 627c5c4

Browse files
committed
Release 1.2.0
- deps: [email protected] - feat: warn with stack
1 parent e584c58 commit 627c5c4

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

History.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11

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
313
==================
414

515
* feat(index.js): warn when result is undefined

index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@
1010
* Module dependencies.
1111
*/
1212

13+
var util = require('util');
1314
var ms = require('ms');
1415

1516
module.exports = function (t) {
1617
if (typeof t === 'number') return t;
1718
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+
}
1923
return r;
2024
};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "humanize-ms",
3-
"version": "1.0.1",
3+
"version": "1.2.0",
44
"description": "transform humanize time to ms",
55
"main": "index.js",
66
"files": ["index.js"],

0 commit comments

Comments
 (0)