fix: add types fileds to package.json exports
[poolifier.git] / examples / multiFunctionWorker.js
... / ...
CommitLineData
1'use strict'
2const { ThreadWorker } = require('poolifier')
3
4function fn0 (data) {
5 console.info('Executing function 0')
6 return { data: 'fn0 your input text was' + data.text }
7}
8
9function fn1 (data) {
10 console.info('Executing function 1')
11 return { data: 'fn1 your input text was' + data.text }
12}
13
14module.exports = new ThreadWorker({ fn0, fn1 })