similarity index 95%
rename from .eslintrc.js
rename to .eslintrc.cjs
index c1e571d5fda56bf1c550cac7c0c4e78fa3712239..85ae204ae62ae0b6de420a5391614a04e2fe4f35 100644 (file)
You can implement a [worker_threads](https://nodejs.org/api/worker_threads.html#class-worker) worker in a simple way by extending the class _ThreadWorker_:
```js
You can implement a [worker_threads](https://nodejs.org/api/worker_threads.html#class-worker) worker in a simple way by extending the class _ThreadWorker_:
```js
-'use strict'
-const { ThreadWorker } = require('poolifier')
+import { ThreadWorker } from 'poolifier'
function yourFunction(data) {
// this will be executed in the worker thread,
function yourFunction(data) {
// this will be executed in the worker thread,
@@ -107,8+106,7 @@ module.exports = new ThreadWorker(yourFunction, {
similarity index 98%
rename from tests/test-utils.js
rename to tests/test-utils.cjs
index ef759824ce7e9b4d0294d84f2fa6dff02aba493a..6dba586641d3b1906caee80c96f38e364b3e9497 100644 (file)