package
Turn the function object to URL object.
npm install pseudo-functionGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Turn the function object to URL object. This library is useful to create web workers from inline functions.
npm:
$ npm install pseudo-functionbower:
$ bower install pseudo-function// var pfn = window.PseudoFunction; // bower
var pfn = require('pseudo-function'); // browserify
var fn = pfn(function() {
setInterval(function() {
self.postMessage(new Date());
}, 1000);
});
var worker = new Worker(fn);
worker.onmessage = function(e) {
console.log(e.data);
};
setTimeout(function() {
worker.terminate();
fn.
MIT
Estimated unpacked size across 4 packages.
309.8 kB
Includes dependencies.