chore: migrate to eslint 9
[poolifier.git] / examples / javascript / multiFunctionWorker.cjs
CommitLineData
106744f7 1'use strict'
60fbd6d6 2const { ThreadWorker } = require('poolifier')
106744f7 3
3a502712
JB
4/**
5 *
6 * @param data
7 */
a86b6df1 8function fn0 (data) {
c84b1e6e
JB
9 console.info('Executing fn0')
10 return { data: `fn0 input text was '${data.text}'` }
106744f7 11}
12
3a502712
JB
13/**
14 *
15 * @param data
16 */
a86b6df1 17function fn1 (data) {
c84b1e6e
JB
18 console.info('Executing fn1')
19 return { data: `fn1 input text was '${data.text}'` }
a86b6df1
JB
20}
21
22module.exports = new ThreadWorker({ fn0, fn1 })