blob: fc334f135661baab87a1c2ca7643c0ed5a04f770 [file] [log] [blame]
'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');
};