web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
526 B

  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var $TypeError = GetIntrinsic('%TypeError%');
  4. var callBound = require('call-bind/callBound');
  5. var $SymbolToString = callBound('Symbol.prototype.toString', true);
  6. var Type = require('./Type');
  7. // https://ecma-international.org/ecma-262/6.0/#sec-symboldescriptivestring
  8. module.exports = function SymbolDescriptiveString(sym) {
  9. if (Type(sym) !== 'Symbol') {
  10. throw new $TypeError('Assertion failed: `sym` must be a Symbol');
  11. }
  12. return $SymbolToString(sym);
  13. };