<reponame>haiquan5396/VINIF<filename>dapps/b-agri/mobile/test/api-check/uri-register.js<gh_stars>0// create by Minh Nguyen;
// email: nnheo@example.com;

const funcStore = {};

const uriRegister = {
    addFunc: function(name, func) {
        if (funcStore[name]) {
            console.log(`The function ${name} have been exist!`);
        }

        funcStore[name] = func;
    },
    getAllFunc: function() {
        return Object.keys(funcStore);
    },
    getFuncByName: function(name) {
        return funcStore[name];
    }
}

module.exports = uriRegister;
