Add files
This commit is contained in:
commit
bb80829159
18195 changed files with 2122994 additions and 0 deletions
60
509bba0_unpacked_with_node_modules/~/webworkify/index.js
generated
Executable file
60
509bba0_unpacked_with_node_modules/~/webworkify/index.js
generated
Executable file
|
@ -0,0 +1,60 @@
|
|||
var bundleFn = arguments[3];
|
||||
var sources = arguments[4];
|
||||
var cache = arguments[5];
|
||||
|
||||
var stringify = JSON.stringify;
|
||||
|
||||
module.exports = function (fn) {
|
||||
var keys = [];
|
||||
var wkey;
|
||||
var cacheKeys = Object.keys(cache);
|
||||
|
||||
for (var i = 0, l = cacheKeys.length; i < l; i++) {
|
||||
var key = cacheKeys[i];
|
||||
if (cache[key].exports === fn) {
|
||||
wkey = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!wkey) {
|
||||
wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
|
||||
var wcache = {};
|
||||
for (var i = 0, l = cacheKeys.length; i < l; i++) {
|
||||
var key = cacheKeys[i];
|
||||
wcache[key] = key;
|
||||
}
|
||||
sources[wkey] = [
|
||||
Function(['require','module','exports'], '(' + fn + ')(self)'),
|
||||
wcache
|
||||
];
|
||||
}
|
||||
var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
|
||||
|
||||
var scache = {}; scache[wkey] = wkey;
|
||||
sources[skey] = [
|
||||
Function(['require'],'require(' + stringify(wkey) + ')(self)'),
|
||||
scache
|
||||
];
|
||||
|
||||
var src = '(' + bundleFn + ')({'
|
||||
+ Object.keys(sources).map(function (key) {
|
||||
return stringify(key) + ':['
|
||||
+ sources[key][0]
|
||||
+ ',' + stringify(sources[key][1]) + ']'
|
||||
;
|
||||
}).join(',')
|
||||
+ '},{},[' + stringify(skey) + '])'
|
||||
;
|
||||
return new Worker(window.URL.createObjectURL(
|
||||
new Blob([src], { type: 'text/javascript' })
|
||||
));
|
||||
};
|
||||
|
||||
|
||||
|
||||
//////////////////
|
||||
// WEBPACK FOOTER
|
||||
// ./~/webworkify/index.js
|
||||
// module id = 1186
|
||||
// module chunks = 4
|
Loading…
Add table
Add a link
Reference in a new issue