Skip to content

m64253/create-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Worker

After seeing https://gist.github.com/3696516 I was inspired and wrote this just to test it out and to try make a simple helper function out of it.

// Create a simple echo worker function that returns what you send it
var echoFn = createWorker(function (data, done) {
	done(data);
});

// Usage
echoFn([1, 2, 3], function (data) {
	console.log('first', data)
});

// Usage
echoFn([4, 5, 6], function (data) {
	console.log('second', data)
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published