Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/reusify/reusify.js b/node_modules/reusify/reusify.js
new file mode 100644
index 0000000..e6f36f3
--- /dev/null
+++ b/node_modules/reusify/reusify.js
@@ -0,0 +1,33 @@
+'use strict'
+
+function reusify (Constructor) {
+ var head = new Constructor()
+ var tail = head
+
+ function get () {
+ var current = head
+
+ if (current.next) {
+ head = current.next
+ } else {
+ head = new Constructor()
+ tail = head
+ }
+
+ current.next = null
+
+ return current
+ }
+
+ function release (obj) {
+ tail.next = obj
+ tail = obj
+ }
+
+ return {
+ get: get,
+ release: release
+ }
+}
+
+module.exports = reusify