Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/p-map-series/index.js b/node_modules/p-map-series/index.js
new file mode 100644
index 0000000..071cca5
--- /dev/null
+++ b/node_modules/p-map-series/index.js
@@ -0,0 +1,12 @@
+'use strict';
+const pReduce = require('p-reduce');
+
+module.exports = (iterable, iterator) => {
+ const ret = [];
+
+ return pReduce(iterable, (a, b, i) => {
+ return Promise.resolve(iterator(b, i)).then(val => {
+ ret.push(val);
+ });
+ }).then(() => ret);
+};
diff --git a/node_modules/p-map-series/license b/node_modules/p-map-series/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/p-map-series/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/p-map-series/package.json b/node_modules/p-map-series/package.json
new file mode 100644
index 0000000..ff40d2a
--- /dev/null
+++ b/node_modules/p-map-series/package.json
@@ -0,0 +1,79 @@
+{
+ "_from": "p-map-series@^1.0.0",
+ "_id": "p-map-series@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=",
+ "_location": "/p-map-series",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "p-map-series@^1.0.0",
+ "name": "p-map-series",
+ "escapedName": "p-map-series",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/bin-build"
+ ],
+ "_resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz",
+ "_shasum": "bf98fe575705658a9e1351befb85ae4c1f07bdca",
+ "_spec": "p-map-series@^1.0.0",
+ "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\bin-build",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/p-map-series/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "p-reduce": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Map over promises serially",
+ "devDependencies": {
+ "ava": "*",
+ "delay": "^1.3.1",
+ "time-span": "^1.0.0",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/p-map-series#readme",
+ "keywords": [
+ "promise",
+ "map",
+ "collection",
+ "iterable",
+ "iterator",
+ "fulfilled",
+ "serial",
+ "serially",
+ "async",
+ "await",
+ "promises",
+ "bluebird"
+ ],
+ "license": "MIT",
+ "name": "p-map-series",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/p-map-series.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.0.0",
+ "xo": {
+ "esnext": true
+ }
+}
diff --git a/node_modules/p-map-series/readme.md b/node_modules/p-map-series/readme.md
new file mode 100644
index 0000000..0b4177a
--- /dev/null
+++ b/node_modules/p-map-series/readme.md
@@ -0,0 +1,80 @@
+# p-map-series [](https://travis-ci.org/sindresorhus/p-map-series)
+
+> Map over promises serially
+
+Useful as a side-effect mapper. Use [`p-map`](https://github.com/sindresorhus/p-map) if you don't need side-effects, as it's concurrent.
+
+
+## Install
+
+```
+$ npm install --save p-map-series
+```
+
+
+## Usage
+
+```js
+const pMapSeries = require('p-map-series');
+
+const keywords = [
+ getTopKeyword() //=> Promise
+ 'rainbow',
+ 'pony'
+];
+
+let scores = [];
+
+const mapper = keyword => fetchScore(keyword).then(score => {
+ scores.push(score);
+ return {keyword, score};
+});
+
+pMapSeries(keywords, mapper).then(result => {
+ console.log(result);
+ /*
+ [{
+ keyword: 'unicorn',
+ score: 99
+ }, {
+ keyword: 'rainbow',
+ score: 70
+ }, {
+ keyword: 'pony',
+ score: 79}
+ ]
+ */
+});
+```
+
+
+## API
+
+### pMapSeries(input, mapper)
+
+Returns a `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the `mapper` created promises fulfillment values.
+
+#### input
+
+Type: `Iterable<Promise|any>`
+
+Mapped over serially in the `mapper` function.
+
+#### mapper(element, index)
+
+Type: `Function`
+
+Expected to return a value. If it's a `Promise`, it's awaited before continuing with the next iteration.
+
+
+## Related
+
+- [p-each-series](https://github.com/sindresorhus/p-each-series) - Iterate over promises serially
+- [p-reduce](https://github.com/sindresorhus/p-reduce) - Reduce a list of values using promises into a promise for a value
+- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently
+- [More…](https://github.com/sindresorhus/promise-fun)
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)