X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fcore-js%2Finternals%2Fnumber-parse-int.js;h=8f3fd6c8078909b0b43a8bc6909d3462f580c33d;hb=3be0a9efc698a9570a44456009afc6014812625a;hp=11b8232f249ef8d48dcc019f5838c3b41e7a06b0;hpb=3aba54c891969552833dbc350b3139e944e17a97;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/number-parse-int.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/number-parse-int.js index 11b8232f..8f3fd6c8 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/number-parse-int.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/number-parse-int.js @@ -1,14 +1,22 @@ var global = require('../internals/global'); +var fails = require('../internals/fails'); +var uncurryThis = require('../internals/function-uncurry-this'); +var toString = require('../internals/to-string'); var trim = require('../internals/string-trim').trim; var whitespaces = require('../internals/whitespaces'); var $parseInt = global.parseInt; -var hex = /^[+-]?0[Xx]/; -var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22; +var Symbol = global.Symbol; +var ITERATOR = Symbol && Symbol.iterator; +var hex = /^[+-]?0x/i; +var exec = uncurryThis(hex.exec); +var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22 + // MS Edge 18- broken with boxed symbols + || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); })); // `parseInt` method -// https://tc39.github.io/ecma262/#sec-parseint-string-radix +// https://tc39.es/ecma262/#sec-parseint-string-radix module.exports = FORCED ? function parseInt(string, radix) { - var S = trim(String(string)); - return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10)); + var S = trim(toString(string)); + return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10)); } : $parseInt;