lix-website/themes/lix/assets/bootstrap/node_modules/es-abstract/2017/SymbolDescriptiveString.js

17 lines
443 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
'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);
};