MCPcopy Create free account
hub / github.com/Moli-X/Resources / cb_decode

Function cb_decode

Script/Parser.js:3088–3102  ·  view source on GitHub ↗
(cccc)

Source from the content-addressed store, hash-verified

3086 return b.replace(re_btou, cb_btou);
3087 };
3088 var cb_decode = function (cccc) {
3089 var len = cccc.length,
3090 padlen = len % 4,
3091 n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
3092 | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
3093 | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
3094 | (len > 3 ? b64tab[cccc.charAt(3)] : 0),
3095 chars = [
3096 fromCharCode(n >>> 16),
3097 fromCharCode((n >>> 8) & 0xff),
3098 fromCharCode(n & 0xff)
3099 ];
3100 chars.length -= [0, 0, 2, 1][padlen];
3101 return chars.join('');
3102 };
3103 var _atob = function (a) {
3104 return a.replace(/\S{1,4}/g, cb_decode);
3105 };

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected