varkeeper
Desciption
varkeeper is A tool for handling vars globally in different modules.
Usage
Installation
You can install varkeeper using npm or yarn.
npm install varkeeper
yarn add varkeeper
var vk = require("varkeeper");
Functional
set property
vk.setprop("varName", "varValue");
get property
vk.getprop("varName");
events
vk.on("eventType",'varName', function(value){
//do something
}
eventTypes:
- set
- get
- change
OOP
init property
var vkObj = new vk.Prop("varName", "varValue");
reference on existing property
var vkObj = new vk.Prop("varName");
set property
vkObj.set("varValue");
get property
var vkObj = new vk.Prop("varName", "varValue");
vkObj.get();
events
vkObj.on("eventType", function (value) {
//do something
});
eventTypes:
- set
- get
- change