Offload tasks to a pool of workers on node.js and in the browser
Overall
score
95%
A utility that processes text files in a worker pool and reports progress events during processing.
["file1.txt", "file2.txt"] where file1.txt contains "hello" and file2.txt contains "world", returns ["HELLO", "WORLD"] and emits a progress event for each file processed @test@generates
/**
* Processes an array of file paths, reading each file, converting its content
* to uppercase, and emitting progress events for each file processed.
*
* @param {string[]} filePaths - Array of file paths to process
* @returns {Promise<string[]>} Array of uppercase file contents
*/
async function processFiles(filePaths) {
// IMPLEMENTATION HERE
}
module.exports = { processFiles };Provides worker pool functionality for offloading tasks and emitting progress events.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-workerpoolevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10