0.2.3 • Published 3 years ago

@bisaek/is v0.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

is wiki

install:

npm i @bisaek/is

or:

npm install @bisaek/is

reqiure is

const { isConfig, is } = require("is");

code example

with is:

if (is.month("december") || is.month("january") || is.month("february")) {
  console.log("its cold outside");
}

without is:

let myDate = new Date();

if (
  myDate.getMonth() === 11 ||
  myDate.getMonth() === 0 ||
  myDate.getMonth() === 1
) {
  console.log("its cold outside");
}

with is its better because its more readable, and less. in is can you use string and int to write the month.

example:

isConfig.month.jan = 0;

console.log(is.month("january"), "jan");
console.log(is.month(0), "jan");

console:

>node example.js
true
true

read more

0.3.0

3 years ago

0.2.3

3 years ago

0.3.1

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

1.0.0

3 years ago