2020-08-25 23:57:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
2021-02-26 03:58:33 +00:00
|
|
|
var GetIntrinsic = require('get-intrinsic');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
|
|
|
var $String = GetIntrinsic('%String%');
|
2024-03-28 02:00:41 +00:00
|
|
|
var $TypeError = require('es-errors/type');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
2022-11-10 10:43:16 +00:00
|
|
|
// https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type
|
2020-08-25 23:57:08 +00:00
|
|
|
|
|
|
|
module.exports = function NumberToString(m) {
|
2024-03-28 02:00:41 +00:00
|
|
|
if (typeof m !== 'number') {
|
2021-02-26 03:58:33 +00:00
|
|
|
throw new $TypeError('Assertion failed: "m" must be a String');
|
2020-08-25 23:57:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $String(m);
|
|
|
|
};
|
|
|
|
|