MCPcopy Index your code
hub / github.com/EmulatorJS/EmulatorJS / Va

Function Va

data/compression/libunrar.js:13–13  ·  view source on GitHub ↗
(a,b)

Source from the content-addressed store, hash-verified

11function Ma(){K--;c.monitorRunDependencies&&c.monitorRunDependencies(K);if(0==K&&(null!==Ja&&(clearInterval(Ja),Ja=null),Ka)){var a=Ka;Ka=null;a()}}c.preloadedImages={};c.preloadedAudios={};function u(a){if(c.onAbort)c.onAbort(a);ka(a);v(a);na=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function Na(a){var b=L;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function Oa(){return Na("data:application/octet-stream;base64,")}
12var L="libunrar.wasm";if(!Oa()){var Pa=L;L=c.locateFile?c.locateFile(Pa,p):p+Pa}function Qa(){try{if(ma)return new Uint8Array(ma);if(ha)return ha(L);throw"both async and sync fetching of the wasm failed";}catch(a){u(a)}}function Ra(){return ma||!da&&!m||"function"!==typeof fetch||Na("file://")?new Promise(function(a){a(Qa())}):fetch(L,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+L+"'";return a.arrayBuffer()}).catch(function(){return Qa()})}
13var M,N;Aa.push({Jc:function(){Sa()}});function Ta(a){return a.replace(/\b_Z[\w\d_]+/g,function(b){return b===b?b:b+" ["+b+"]"})}function Ua(){return 0<Ua.Ea}function Va(a,b){for(var d=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),d++):d&&(a.splice(e,1),d--)}if(b)for(;d;d--)a.unshift("..");return a}
14function O(a){var b="/"===a.charAt(0),d="/"===a.substr(-1);(a=Va(a.split("/").filter(function(e){return!!e}),!b).join("/"))||b||(a=".");a&&d&&(a+="/");return(b?"/":"")+a}function Wa(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function P(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}
15function Xa(){var a=Array.prototype.slice.call(arguments,0);return O(a.join("/"))}function Q(a,b){return O(a+"/"+b)}function Ya(a){return H[Za()>>2]=a}function R(){for(var a="",b=!1,d=arguments.length-1;-1<=d&&!b;d--){b=0<=d?arguments[d]:S.cwd();if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Va(a.split("/").filter(function(e){return!!e}),!b).join("/");return(b?"/":"")+a||"."}
16function $a(a,b){function d(k){for(var l=0;l<k.length&&""===k[l];l++);for(var q=k.length-1;0<=q&&""===k[q];q--);return l>q?[]:k.slice(l,q-l+1)}a=R(a).substr(1);b=R(b).substr(1);a=d(a.split("/"));b=d(b.split("/"));for(var e=Math.min(a.length,b.length),f=e,h=0;h<e;h++)if(a[h]!==b[h]){f=h;break}e=[];for(h=f;h<a.length;h++)e.push("..");e=e.concat(b.slice(f));return e.join("/")}var ab=[];function bb(a,b){ab[a]={input:[],output:[],Ta:b};S.Hb(a,cb)}

Callers 3

OFunction · 0.85
RFunction · 0.85
libunrar.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected