Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/call-me-maybe/index.js b/node_modules/call-me-maybe/index.js
new file mode 100644
index 0000000..b3c5d44
--- /dev/null
+++ b/node_modules/call-me-maybe/index.js
@@ -0,0 +1,20 @@
+"use strict"
+
+var next = (global.process && process.nextTick) || global.setImmediate || function (f) {
+ setTimeout(f, 0)
+}
+
+module.exports = function maybe (cb, promise) {
+ if (cb) {
+ promise
+ .then(function (result) {
+ next(function () { cb(null, result) })
+ }, function (err) {
+ next(function () { cb(err) })
+ })
+ return undefined
+ }
+ else {
+ return promise
+ }
+}