source: trip-planner-front/node_modules/core-js/internals/date-to-primitive.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 489 bytes
Line 
1'use strict';
2var anObject = require('../internals/an-object');
3var ordinaryToPrimitive = require('../internals/ordinary-to-primitive');
4
5// `Date.prototype[@@toPrimitive](hint)` method implementation
6// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
7module.exports = function (hint) {
8 anObject(this);
9 if (hint === 'string' || hint === 'default') hint = 'string';
10 else if (hint !== 'number') throw TypeError('Incorrect hint');
11 return ordinaryToPrimitive(this, hint);
12};
Note: See TracBrowser for help on using the repository browser.