to-string.js 241 B

12345678
  1. var classof = require('../internals/classof');
  2. var $String = String;
  3. module.exports = function (argument) {
  4. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  5. return $String(argument);
  6. };