mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-24 13:01:24 +01:00
merge completed... now to fix all the bugs...
This commit is contained in:
commit
87c4d80fbc
3472 changed files with 466748 additions and 6517 deletions
22
node_modules/es-abstract/2015/CanonicalNumericIndexString.js
generated
vendored
Normal file
22
node_modules/es-abstract/2015/CanonicalNumericIndexString.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var SameValue = require('./SameValue');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring
|
||||
|
||||
module.exports = function CanonicalNumericIndexString(argument) {
|
||||
if (Type(argument) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `argument` must be a String');
|
||||
}
|
||||
if (argument === '-0') { return -0; }
|
||||
var n = ToNumber(argument);
|
||||
if (SameValue(ToString(n), argument)) { return n; }
|
||||
return void 0;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue