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.

NumberToString.js 396B

123456789101112131415161718
  1. 'use strict';
  2. var GetIntrinsic = require('../GetIntrinsic');
  3. var $String = GetIntrinsic('%String%');
  4. var Type = require('./Type');
  5. // https://www.ecma-international.org/ecma-262/9.0/#sec-tostring-applied-to-the-number-type
  6. module.exports = function NumberToString(m) {
  7. if (Type(m) !== 'Number') {
  8. throw new TypeError('Assertion failed: "m" must be a String');
  9. }
  10. return $String(m);
  11. };