0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/libs/parallel_shell_helpers.js

6 lines
217 B
JavaScript
Raw Normal View History

/**
* Allows passing arguments to the function executed by startParallelShell.
*/
const funWithArgs = (fn, ...args) =>
"(" + fn.toString() + ")(" + args.map(x => tojson(x)).reduce((x, y) => x + ", " + y) + ")";