X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fcore-js%2Flibrary%2Fmodules%2F_parse-int.js;fp=node_modules%2Fcore-js%2Flibrary%2Fmodules%2F_parse-int.js;h=c23ffc09c08afcdbe056a0967fe4fa353e2c4e20;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/core-js/library/modules/_parse-int.js b/node_modules/core-js/library/modules/_parse-int.js new file mode 100644 index 000000000..c23ffc09c --- /dev/null +++ b/node_modules/core-js/library/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt + , $trim = require('./_string-trim').trim + , ws = require('./_string-ws') + , hex = /^[\-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; \ No newline at end of file