_ _ ___ _____ ___ _ _
| | | | |_ |_ _|/ _ \ | \ | |
| | | | | | | | / /_\ \| \| |
| | | | | | | | | _ || . ` |
| |_| /\__/ /_| |_| | | || |\ |
\___/\____/ \___/\_| |_/\_| \_/
Library for making dev environment better
Zero Dependency
npm install ujian
For checking if the code run directly or evaluate through import/require
const { isMain } = require("ujian");
if (isMain(module)) {
console.log(
"this code will run if someone execute directly... eg. node add.js"
);
} else {
console.log(
"this code will run if it being require from somewhere else eg. require('./add.js')"
);
}