README
[NodeJS] MATS (Make Asynchronous To Synchronous)
Release | Issue | Pull Request |
---|---|---|
Latest: () Pre: () |
Open: Closed: |
Open: Closed: |
📜 Description
A module/library to make function/module file from asynchronous to synchronous, via child_process.execFileSync
.
Click here to view the official documentation online.
âš Important
- Do not use this in the server! This will completely unable to scale, and cause the server freeze/hang.
- Do not use this for a synchronous function/module file! This can cause performance issue.
📄 Documentation (Excerpt)
Getting Started
NodeJS (v10+) & NPM (v6+):
> npm install @hugoalh/mats
API
execute(modulePath, ...inputs?)
Example
const mats = require("@hugoalh/mats");
mats.execute(
require.resolve("./settimeout.js"),
JSON.stringify({
time: 5000
})
);