hapi-massive
Advanced tools
Comparing version 1.0.1 to 1.0.2
10
index.js
var Hoek = require("hoek"); | ||
var massive = require("massive"); | ||
var Promise = require("bluebird"); | ||
@@ -15,2 +16,11 @@ var DEFAULTS = { | ||
if(err){ return next(err); } | ||
// wrap with bluebird for promise support | ||
Promise.promisifyAll(db); | ||
for(var prop in db){ | ||
if(db[prop] instanceof Object && !(db[prop] instanceof Array) && !(db[prop] instanceof Function)){ | ||
Promise.promisifyAll(db[prop]); | ||
} | ||
} | ||
// make available in hapi application | ||
@@ -17,0 +27,0 @@ server.expose("db", db); |
{ | ||
"name": "hapi-massive", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Hapi plugin for massivejs 2.0", | ||
@@ -16,2 +16,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"bluebird": "^2.9.30", | ||
"hapi": "^8.6.1", | ||
@@ -18,0 +19,0 @@ "hoek": "^2.14.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2453
28
4