refactor: refine code examples
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 27 Sep 2023 18:58:18 +0000 (20:58 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 27 Sep 2023 18:58:18 +0000 (20:58 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
examples/javascript/multiFunctionWorker.js

index 20c416951f91838cd6de46202691b8f16ec90e25..f21f8b48bb8cca8df0e3b0b03f06d7e641df438d 100644 (file)
@@ -3,12 +3,12 @@ const { ThreadWorker } = require('poolifier')
 
 function fn0 (data) {
   console.info('Executing function 0')
-  return { data: `fn0 your input text was ${data.text}` }
+  return { data: `fn0 your input text was '${data.text}'` }
 }
 
 function fn1 (data) {
   console.info('Executing function 1')
-  return { data: `fn1 your input text was ${data.text}` }
+  return { data: `fn1 your input text was '${data.text}'` }
 }
 
 module.exports = new ThreadWorker({ fn0, fn1 })