source: imaps-frontend/node_modules/core-js/internals/date-to-primitive.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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