Frontend/25_01_07/mai/node_modules/es-abstract/2018/SymbolDescriptiveString.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

17 lines
434 B
JavaScript

'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
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);
};