INNER CODE UNIT · JavaScript
checkInitStatus
e-oj/Fawn · lib/fawn.js:63
function checkInitStatus() {
if (!(Roller)) {
throw new Error("Fawn has not been initialized. Call Fawn.init");
}
}
function cleanOptions(options) {
if (typeof options !== "object") return {};
var clean = {};
var properties = ["db", "server", "replset", "user", "pass", "auth", "mongos", "promiseLibrary"];
properties.forEach(function (prop) {
if (options[prop]) clean[prop] = options[prop];
});
return clean;
}