项目原始demo,不改动
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。
 
 
 
 

17 行
562 B

  1. 'use strict';
  2. var $export = require('./_export');
  3. var toObject = require('./_to-object');
  4. var toPrimitive = require('./_to-primitive');
  5. $export($export.P + $export.F * require('./_fails')(function () {
  6. return new Date(NaN).toJSON() !== null
  7. || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
  8. }), 'Date', {
  9. // eslint-disable-next-line no-unused-vars
  10. toJSON: function toJSON(key) {
  11. var O = toObject(this);
  12. var pv = toPrimitive(O);
  13. return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  14. }
  15. });