Show More
Commit Description:
add model solution
Commit Description:
add model solution
References:
File last commit:
Show/Diff file:
Action:
node_modules/core-js/modules/es6.date.to-string.js
| 12 lines
| 435 B
| application/javascript
| JavascriptLexer
|
r789 | var DateProto = Date.prototype; | |||
var INVALID_DATE = 'Invalid Date'; | ||||
var TO_STRING = 'toString'; | ||||
var $toString = DateProto[TO_STRING]; | ||||
var getTime = DateProto.getTime; | ||||
if (new Date(NaN) + '' != INVALID_DATE) { | ||||
require('./_redefine')(DateProto, TO_STRING, function toString() { | ||||
var value = getTime.call(this); | ||||
// eslint-disable-next-line no-self-compare | ||||
return value === value ? $toString.call(this) : INVALID_DATE; | ||||
}); | ||||
} | ||||