repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: more object destructuration cleanup in examples
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
functions
/
function-to-bench.js
diff --git
a/benchmarks/versus-external-pools/functions/function-to-bench.js
b/benchmarks/versus-external-pools/functions/function-to-bench.js
index 5c63c794df69f26a61c12c8c04e8e3a18b0805ab..eca756b715d3a0052c99db37aafe9cc6ab1e3492 100644
(file)
--- a/
benchmarks/versus-external-pools/functions/function-to-bench.js
+++ b/
benchmarks/versus-external-pools/functions/function-to-bench.js
@@
-5,7
+5,7
@@
* @param {*} data The worker data.
* @returns {*} The result.
*/
* @param {*} data The worker data.
* @returns {*} The result.
*/
-
module.exports = function functionToBench (data)
{
+
const functionToBench = (data) =>
{
const crypto = require('crypto')
const fs = require('fs')
const TaskTypes = {
const crypto = require('crypto')
const fs = require('fs')
const TaskTypes = {
@@
-48,3
+48,5
@@
module.exports = function functionToBench (data) {
throw new Error(`Unknown task type: ${data.taskType}`)
}
}
throw new Error(`Unknown task type: ${data.taskType}`)
}
}
+
+module.exports = functionToBench