jemalloc-check v1.0.4
jemalloc-check
A simple utility for checking whether jemalloc(https://github.com/jemalloc/jemalloc) is installed on a system.
Installation
npm install jemalloc-checkAPI & Usage
jemallocCheck()
Returns a promise that resolves to the file path of the stable version of jemalloc if it is available, or false if it is not available. The promise will resolve with false on Windows systems, as jemalloc is a Linux/Unix tool.
const { jemallocCheck } = require('jemalloc-check');
jemallocCheck().then((result) => {
if (result) {
console.log(`jemalloc is installed at ${result}`);
} else {
console.log('jemalloc is not installed');
}
});Command-line usage
You can run the checker with the following one liner:
> npx jemalloc-checkOr ou can also use jemalloc-check as a command-line tool by installing it globally:
> npm install -g jemalloc-checkThen, you can run the jemalloc-check command to check for the presence of jemalloc on the system:
> jemalloc-checkDebugging
To enable debug logs, set the DEBUG environment variable to jemalloc-check:* before running the jemalloc-check command or calling the jemallocCheck function:
DEBUG=jemalloc-check:* jemalloc-checkprocess.env.DEBUG = 'jemalloc-check:*';
const jemallocCheck = require('jemalloc-check');
jemallocCheck().then((result) => {
if (result) {
console.log(`jemalloc is installed at ${result}`);
} else {
console.log('jemalloc is not installed');
}
});License
MIT
Credits
This package was created with the help of Assistant