Projekt

Obecné

Profil

Stáhnout (402 Bajtů) Statistiky
| Větev: | Revize:
1
'use strict';
2

    
3
var GetIntrinsic = require('../GetIntrinsic');
4

    
5
var $String = GetIntrinsic('%String%');
6
var $TypeError = GetIntrinsic('%TypeError%');
7

    
8
// https://www.ecma-international.org/ecma-262/6.0/#sec-tostring
9

    
10
module.exports = function ToString(argument) {
11
	if (typeof argument === 'symbol') {
12
		throw new $TypeError('Cannot convert a Symbol value to a string');
13
	}
14
	return $String(argument);
15
};
(101-101/117)