Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6212

what is (0, c.default) and what is it doing in this code? [duplicate]

$
0
0

completely new to reactJS, I wanted to understand what (0, c.default) is doing on this code snippet. the code apparently converts hexadecimal value to Base64. but before converting it to the Base64 it was converted as string then but I didn't understand what this code doing (0, c.default)?

Here is the code snippet

f = t.type +"&"+ encodeURIComponent(t.url) +"&"+ n +"&"+ u +"&"+ b +"&LS8goCQy4O2w5xnPmEOp/PjtKe37+d9HxRthqug9VC0=";sig = hexToBase64((0, c.default)(f).toString())

Here is the code snippet of the method hexToBase64()

hexToBase64: function (o) {                return t.btoa(String.fromCharCode.apply(null, o.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split("")))

Viewing all articles
Browse latest Browse all 6212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>