docs(api.md): add missing ToC entry
[poolifier.git] / docs / api.md
index 28e6aad2c3b56bf529890aad889c9029e4b69777..7c206c78ea1581f9691cd52ed47d36be9296ce17 100644 (file)
@@ -6,6 +6,7 @@
   - [`pool = new FixedThreadPool/FixedClusterPool(numberOfThreads/numberOfWorkers, filePath, opts)`](#pool--new-fixedthreadpoolfixedclusterpoolnumberofthreadsnumberofworkers-filepath-opts)
   - [`pool = new DynamicThreadPool/DynamicClusterPool(min, max, filePath, opts)`](#pool--new-dynamicthreadpooldynamicclusterpoolmin-max-filepath-opts)
   - [`pool.execute(data, name, transferList)`](#poolexecutedata-name-transferlist)
+  - [`pool.mapExecute(data, name, transferList)`](#poolmapexecutedata-name-transferlist)
   - [`pool.start()`](#poolstart)
   - [`pool.destroy()`](#pooldestroy)
   - [`pool.hasTaskFunction(name)`](#poolhastaskfunctionname)
 
 This method is available on both pool implementations and returns a promise with the task function execution response.
 
+### `pool.mapExecute(data, name, transferList)`
+
+`data` Iterable objects that you want to pass to your worker task function implementation.  
+`name` (optional) A string with the task function name that you want to execute on the worker. Default: `'default'`  
+`transferList` (optional) An array of transferable objects that you want to transfer to your [`ThreadWorker`](#class-yourworker-extends-threadworkerclusterworker) worker implementation.
+
+This method is available on both pool implementations and returns a promise with the task function execution responses array.
+
 ### `pool.start()`
 
 This method is available on both pool implementations and will start the minimum number of workers.