github-pages-deploy-action/node_modules/core-js-pure/internals/date-to-primitive.js

10 lines
327 B
JavaScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
'use strict';
var anObject = require('../internals/an-object');
var toPrimitive = require('../internals/to-primitive');
module.exports = function (hint) {
if (hint !== 'string' && hint !== 'number' && hint !== 'default') {
throw TypeError('Incorrect hint');
} return toPrimitive(anObject(this), hint !== 'number');
};