aswi2020vldc-gitlab/templetes/node_modules/es-abstract/2019/NumberToString.js @ 10920ea3
1 | 3a515b92 | cagy | 'use strict'; |
---|---|---|---|
2 | |||
3 | var GetIntrinsic = require('../GetIntrinsic'); |
||
4 | |||
5 | var $String = GetIntrinsic('%String%'); |
||
6 | |||
7 | var Type = require('./Type'); |
||
8 | |||
9 | // https://www.ecma-international.org/ecma-262/9.0/#sec-tostring-applied-to-the-number-type
|
||
10 | |||
11 | module.exports = function NumberToString(m) { |
||
12 | if (Type(m) !== 'Number') { |
||
13 | throw new TypeError('Assertion failed: "m" must be a String'); |
||
14 | }
|
||
15 | |||
16 | return $String(m); |
||
17 | };
|