Skip to content

Commit

Permalink
extra interface
Browse files Browse the repository at this point in the history
Signed-off-by: Soldy <[email protected]>
  • Loading branch information
Soldy committed Mar 21, 2022
1 parent 8923653 commit 9d42733
Showing 1 changed file with 59 additions and 6 deletions.
65 changes: 59 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,63 @@ const $levelRunner = (require('levelrunnerrc')).base;
* @prototype
*/
const initBase=function(){
/*
* @param {function} func
* @param {integer} level
* @param {string} name
* @public
* @return {boolean}
*/
this.startAdd = function(fun, level, name){
return _start.add(fun, level, name);
};
/*
* @param {integer} level
* @param {string} name
* @public
* @return {boolean}
*/
this.startdel = function(level, name){
return _start.del(level, name);
}
/*
* @public
*/
this.startRun = function(){
return _start.run();
};
/*
* @param {function} func
* @param {integer} level
* @param {string} name
* @public
* @return {boolean}
*/
this.stopAdd = function(fun, level, name){
return _stop.add(fun, level, name);
};
/*
* @param {integer} level
* @param {string} name
* @public
* @return {boolean}
*/
this.stopdel = function(level, name){
return _stop.del(level, name);
}
/*
* @public
*/
this.stopRun = function(){
return _stop.run();
};
/*
* @public
* @return {integer}
*/
this.status = function(){
return parseInt(_status);
};
/*
* init status
* 0 = init
Expand Down Expand Up @@ -39,18 +96,14 @@ const initBase=function(){
},
process.exit
);
this.start = _start;
/*
* @public
*/
this.stop = _stop;
this.start = _start;
/*
* @public
* @return {integer}
*/
this.status = function(){
return parseInt(_status);
};
this.stop = _stop;
};


Expand Down

0 comments on commit 9d42733

Please sign in to comment.