1.1.3 • Published 4 years ago

ujian v1.1.3

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago
_   _   ___ _____  ___   _   _
| | | | |_  |_   _|/ _ \ | \ | |
| | | |   | | | | / /_\ \|  \| |
| | | |   | | | | |  _  || . ` |
| |_| /\__/ /_| |_| | | || |\  |
 \___/\____/ \___/\_| |_/\_| \_/

Description

Library for making dev environment better

Zero Dependency

Setup

npm install ujian

Example

isMain

For checking if the code run directly or evaluate through import/require

example file name add.js

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')"
  );
}

API

1.1.3

4 years ago

1.1.0

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago