Demo for query storing

Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/strip-dirs/index.js b/node_modules/strip-dirs/index.js
new file mode 100644
index 0000000..974af89
--- /dev/null
+++ b/node_modules/strip-dirs/index.js
@@ -0,0 +1,72 @@
+/*!
+ * strip-dirs | MIT (c) Shinnosuke Watanabe
+ * https://github.com/shinnn/node-strip-dirs
+*/
+'use strict';
+
+const path = require('path');
+const util = require('util');
+
+const isNaturalNumber = require('is-natural-number');
+
+module.exports = function stripDirs(pathStr, count, option) {
+  if (typeof pathStr !== 'string') {
+    throw new TypeError(
+      util.inspect(pathStr) +
+      ' is not a string. First argument to strip-dirs must be a path string.'
+    );
+  }
+
+  if (path.posix.isAbsolute(pathStr) || path.win32.isAbsolute(pathStr)) {
+    throw new Error(`${pathStr} is an absolute path. strip-dirs requires a relative path.`);
+  }
+
+  if (!isNaturalNumber(count, {includeZero: true})) {
+    throw new Error(
+      'The Second argument of strip-dirs must be a natural number or 0, but received ' +
+      util.inspect(count) +
+      '.'
+    );
+  }
+
+  if (option) {
+    if (typeof option !== 'object') {
+      throw new TypeError(
+        util.inspect(option) +
+        ' is not an object. Expected an object with a boolean `disallowOverflow` property.'
+      );
+    }
+
+    if (Array.isArray(option)) {
+      throw new TypeError(
+        util.inspect(option) +
+        ' is an array. Expected an object with a boolean `disallowOverflow` property.'
+      );
+    }
+
+    if ('disallowOverflow' in option && typeof option.disallowOverflow !== 'boolean') {
+      throw new TypeError(
+        util.inspect(option.disallowOverflow) +
+        ' is neither true nor false. `disallowOverflow` option must be a Boolean value.'
+      );
+    }
+  } else {
+    option = {disallowOverflow: false};
+  }
+
+  const pathComponents = path.normalize(pathStr).split(path.sep);
+
+  if (pathComponents.length > 1 && pathComponents[0] === '.') {
+    pathComponents.shift();
+  }
+
+  if (count > pathComponents.length - 1) {
+    if (option.disallowOverflow) {
+      throw new RangeError('Cannot strip more directories than there are.');
+    }
+
+    count = pathComponents.length - 1;
+  }
+
+  return path.join.apply(null, pathComponents.slice(count));
+};