Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boring-cluster

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boring-cluster - npm Package Compare versions

Comparing version 1.1.2 to 2.0.0

21

index.js

@@ -1,16 +0,17 @@

var cluster = require('cluster')
var cpus = require('os').cpus
const cluster = require('cluster')
const { cpus } = require('os')
function boringCluster (mod, opt) {
var opts = opt || {}
var len = opts.workers || cpus().length
var name = opts.name || ''
const boringCluster = (mod, opts = {
workers: cpus().length,
name: ''
}) => {
const { workers, name } = opts
if (cluster.isMaster) {
for (var i = 0; i < len; i++) {
Array.from(workers).fill(null).forEach(() => {
cluster.fork()
}
})
cluster.on('exit', function (worker) {
console.log(name + name ? ' ' : '' + worker.process.pid + ' died; forking.')
cluster.on('exit', (worker) => {
console.log(`${name ? `${name} ` : ''} ${worker.process.pid} died; forking.`)
cluster.fork()

@@ -17,0 +18,0 @@ })

{
"name": "boring-cluster",
"description": "A really boring cluster module",
"version": "1.1.2",
"version": "2.0.0",
"author": {

@@ -42,3 +42,4 @@ "name": "Zac Anger",

"babel-eslint": "8.2.2",
"eslint-config-jane": "0.11.0",
"eslint": "4.18.1",
"eslint-config-jane": "0.11.1",
"eslint-plugin-babel": "4.1.2",

@@ -50,4 +51,4 @@ "eslint-plugin-import": "2.9.0",

"engines": {
"node": ">=4.0.0"
"node": ">=6.4.0"
}
}

@@ -59,3 +59,3 @@ # boring-cluster

This is tested on Node as far back as 4.1.2, and may work on even more ancient
This is tested on Node as far back as 6.4.0, and may work on even more ancient
versions.

@@ -62,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc