|
@ -392,8 +392,11 @@ exports.convert = function (object, type) { |
|
|
|
|
|
|
|
|
case 'number': |
|
|
case 'number': |
|
|
case 'Number': |
|
|
case 'Number': |
|
|
return Number(object.valueOf()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isNaN(Date.parse(object))) { |
|
|
|
|
|
return moment(object).valueOf(); |
|
|
|
|
|
} else { |
|
|
|
|
|
return Number(object.valueOf()); |
|
|
|
|
|
} |
|
|
case 'string': |
|
|
case 'string': |
|
|
case 'String': |
|
|
case 'String': |
|
|
return String(object); |
|
|
return String(object); |
|
@ -1477,4 +1480,4 @@ exports.getScrollBarWidth = function () { |
|
|
document.body.removeChild (outer); |
|
|
document.body.removeChild (outer); |
|
|
|
|
|
|
|
|
return (w1 - w2); |
|
|
return (w1 - w2); |
|
|
}; |
|
|
|
|
|
|
|
|
}; |