UNPKG
colorify
Version:
latest (0.2.0)
0.2.0
0.0.0
a collection of color tools
github.com/skratchdot/colorify
skratchdot/colorify
colorify
/
app
/
js
/
workers
/
last-in-worker-helper.js
13 lines
(12 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
/*globals self */
module.exports =
function
(
fn
)
{
if
(typeof
fn
!== '
function
')
{
fn
=
function
(
)
{}; }
self
.onmessage =
function
(
event
)
{
self
.
postMessage
(fn.
apply
(
null
, event.data)); };
self
.onerror =
function
(
)
{
self
.
postMessage
(
null
); }; };