git-command-helper
Version:
github command helper for nodejs
33 lines (30 loc) • 617 B
JavaScript
// git-command-helper 2.1.0 by Dimas Lanjaka <dimaslanjaka@gmail.com> (https://www.webmanajemen.com)
;
const instances = {};
/**
* get git instance
* @param key
* @returns
*/
function getInstance(key) {
return instances[key];
}
/**
* set git instance
* @param key
* @param instance
*/
function setInstance(key, instance) {
instances[key] = instance;
}
/**
* check git instance
* @param key
* @returns
*/
function hasInstance(key) {
return typeof instances[key] !== "undefined";
}
exports.getInstance = getInstance;
exports.hasInstance = hasInstance;
exports.setInstance = setInstance;