GoScrobble/web/node_modules/core-js/modules/es.date.to-primitive.js

13 lines
531 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var dateToPrimitive = require('../internals/date-to-primitive');
var wellKnownSymbol = require('../internals/well-known-symbol');
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var DatePrototype = Date.prototype;
// `Date.prototype[@@toPrimitive]` method
// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
if (!(TO_PRIMITIVE in DatePrototype)) {
createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
}