Created
November 16, 2023 18:42
-
-
Save shubham-sharmas/625e71a16f514ce77a8beb50e9a36548 to your computer and use it in GitHub Desktop.
This gist demonstrates how we can import Node.js worker threads in ES5 using require and ES6 using import statement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ ES5 | |
const worker = require('node:worker_threads'); | |
// ES6 | |
import worker from 'node:worker_threads'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment