summaryrefslogtreecommitdiff
path: root/node_modules/webworker-threads/src/load.js
blob: ab705ed9c3865252c475c71712a335465c022bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var onmessage, this$ = this;
function addEventListener(event, cb){
  return this.thread.on(event, cb);
}
function close(){
  return this.thread.emit('close');
}
function importScripts(){
  var i$, len$, p, results$ = [];
  for (i$ = 0, len$ = arguments.length; i$ < len$; ++i$) {
    p = arguments[i$];
    results$.push(self.eval(native_fs_.readFileSync(p, 'utf8')));
  }
  return results$;
}
onmessage = null;
thread.on('message', function(args){
  return typeof onmessage === 'function' ? onmessage(args) : void 8;
});