New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

okie

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

okie

Dead simple worker thread pool

1.0.1
latest
Source
npm
Version published
Weekly downloads
252
29.9%
Maintainers
1
Weekly downloads
 
Created
Source

Okie

"Okie dokie, work work"

Dead simple worker threads pool.

const { Worker } = require('okie')

const worker = new Worker(n => n + 1, {
  max: 3 // defaults to os.cpus().length - 1
})

;(async () => {
  const result = await worker.run(1)
  console.log(result) // logs "2"

  worker.stop()
})()

FAQs

Package last updated on 28 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts