Urara-Blog/node_modules/.pnpm-store/v3/files/80/2842d582022be777719fc738c80f8666ac440717053aa0e560b2c7c9e912745164c163d6454fa83e0dc7292cc252ccbc1f792849e66130a87d43a296a120cf
2022-08-14 01:14:53 +08:00

15 lines
396 B
Text

'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = GetIntrinsic('%TypeError%');
// https://ecma-international.org/ecma-262/6.0/#sec-tostring
module.exports = function ToString(argument) {
if (typeof argument === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a string');
}
return $String(argument);
};