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

function-thread

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

function-thread - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

5

index.js
'use strict';
var os = require('os');

@@ -8,3 +7,2 @@ var _ = require('lodash');

var genericPool = require('generic-pool');
/**

@@ -47,3 +45,2 @@ * @param {Function} func

}, options || {});
if (options.usePool) {

@@ -66,3 +63,2 @@ var pool = genericPool.createPool({

}, options.pool);
return function (input) {

@@ -87,3 +83,2 @@ return pool.acquire().then(function(thread) {

}
return function (input) {

@@ -90,0 +85,0 @@ var thread = spawn(func);

2

package.json
{
"name": "function-thread",
"version": "0.2.2",
"version": "0.2.3",
"description": "Run the function in a separate thread",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,4 +1,8 @@

'use strict';
var childProcess = require('child_process');
var path = require('path');
/**
* @param func
* @returns {ChildProcess}
*/
module.exports = function (func) {

@@ -5,0 +9,0 @@ var thread = childProcess.fork(path.join(__dirname, 'worker.js'));

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