Added utils module
This commit is contained in:
parent
643c2879fe
commit
9faccf8638
|
@ -0,0 +1,11 @@
|
||||||
|
exports.safeRequire = safeRequire;
|
||||||
|
|
||||||
|
function safeRequire(module) {
|
||||||
|
try {
|
||||||
|
return require(module);
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Run "npm install ' + module + '" command to use jugglingdb using this database');
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue