ohctechv3/.svn/pristine/8f/8fe66573b739e5d44cb9307507155398c297141a.svn-base
2024-10-28 15:03:36 +05:30

17 lines
443 B
Plaintext

'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bind/callBound');
var $SymbolToString = callBound('Symbol.prototype.toString', true);
// https://262.ecma-international.org/6.0/#sec-symboldescriptivestring
module.exports = function SymbolDescriptiveString(sym) {
if (typeof sym !== 'symbol') {
throw new $TypeError('Assertion failed: `sym` must be a Symbol');
}
return $SymbolToString(sym);
};