diff --git a/lib/utils.js b/lib/utils.js new file mode 100644 index 00000000..ba4729ee --- /dev/null +++ b/lib/utils.js @@ -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 + } +} +