1.0.0 • Published 6 years ago

mybool v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

What is this?

This module is for making your own booleans, with different true and false values.

For example I want to make my boolean like this: true value: "exists" false value: "dexists"

So I can make that with this module!

Usage

var mybool = require('mybool');

var options = {
    true: "exists",
    false: "dexists"
}

var booly = new mybool(options);

booly.set("exists");

console.log(booly.state);

//Output: exists

//You can not set it to anything else
booly.set("hi"); //ERROR

//Reseting
booly.reset(); //will reset it to false value

options = {
    true: "hi",
    false: "bye"
}

booly.reset(options); //will reset it's options.

Owner and License

kakahan (I) own it.