Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
327 B

4 years ago
'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');
};