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.

15 lines
396 B

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