Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
junodechild
Advanced tools
For the processes that lock main thread.
$ npm install junodechild
var nodeChild = require("junodechild");
nodeChild.get({
fn: function (message) {
for (var i = 0; i < 9999999999; i++) {}
// Used to write any strig to console.txt.
this.log(message + "\n" + new Date().toISOString());
// This is end of thread. This method will close child thread and then returns parameter.
this.end(i);
},
// Only values in JSON format can be sent.
params: ["This is a parameter."],
cb: function (i) {
console.log(
"Processing Time: " +
Math.abs((new Date().getTime() - sd.getTime()) / 1000) +
"ms " +
"Variable i value: " + i
);
},
ecb: function (err) {
console.log(err);
}
});
nodeChild.set([options])
or nodeChild.set(key, value)
Parameters:
[options]
: Optional object containing any of the following properties:
[childConsolePath]
: Console file path of the node child for test or debuging.Or
key
: String key names of the above properties (childConsolePath).
value
: Value of the above properties (childConsolePath).
nodeChild.get([options])
Parameters:
[options]
: The object containing of the following properties:
[params]
: Optional parameters of function to be executed in another node child. It must be an array when used.
[fn]
: Function to be executed in another node child. If the params is exist, it is written to the parameters of the function respectively.
[cb]
: Optional callback function to be run after the end of the node child.
[ecb]
: Optional error callback function to be run when the node child throws an error.
this.log(message)
message
: String message to be log.this.end(data)
To close the node child.
data
: Optional data to be sent for the callback function.This example shows the most basic way of usage.
This software is free to use under the JosephUz. See the LICENSE file for license text and copyright information.
FAQs
Used to create new thread.
The npm package junodechild receives a total of 0 weekly downloads. As such, junodechild popularity was classified as not popular.
We found that junodechild demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.