New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

enginer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enginer

An utility js/ts library to make Javscript conccurent

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source


Enginer

An utility js/ts library to make Javscript conccurent!

Motivation

While trying to make high-scalable and performant systems, I end up being in contact with node.js' worker_threads which were trully nice! But unfortunelly, at least in my search, I could not find any implementations that support typescript.

I end up trying some work arounds, but, as a developer that likes a lot concurrency, I decided to make my own implementation. So here it is! Hope it helps! :)

Installation

npm install enginer

or

yarn add enginer

Usage

Single Worker

const filepath = resolve(__dirname, "file.ts");

new Worker({ filepath });

Worker Pool

const filepath = resolve(__dirname, "file.ts");

new Pool({
  max: 4,
  workers: [
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
    new Worker({ filepath }),
  ],
});

ToDo

  • 🕐 Support commands as well as files/scripts.

License

MIT

Keywords

concurrency

FAQs

Package last updated on 10 Aug 2021

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