{"_id":"@derhuerst/flow-of-computations","_rev":"3-ad8a63fc7b612d2aef77800a5e640278","name":"@derhuerst/flow-of-computations","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@derhuerst/flow-of-computations","description":"Filter, transform and merge sets of data.","version":"0.1.0","main":"index.js","author":{"name":"Jannis R","email":"mail@jannisr.de"},"homepage":"https://github.com/derhuerst/todo-name","repository":{"type":"git","url":"git+https://github.com/derhuerst/todo-name.git"},"bugs":{"url":"https://github.com/derhuerst/todo-name/issues"},"license":"ISC","engines":{"node":">=8"},"dependencies":{"find-cycle":"^1.0.0","lodash":"^4.17.11","tinyqueue":"^2.0.3"},"devDependencies":{"benchmark":"^2.1.4"},"gitHead":"419e11c6c6ac74729952a1d9f52b128b62c0e0c7","_id":"@derhuerst/flow-of-computations@0.1.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3AUimrRiE8GZ4H+oIt8j+8CpOE4iHlBcCtv3yZBuZcTB0w2rt2kfKvpgozqGLWzMxYO1KbkzOpRvlvFMoPN9LQ==","shasum":"c1d74907b2d09640feaa01e6c199d7fbd0b70251","tarball":"https://registry.npmjs.org/@derhuerst/flow-of-computations/-/flow-of-computations-0.1.0.tgz","fileCount":7,"unpackedSize":11169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDldQCRA9TVsSAnZWagAAyDEP/0VL2gj2wYZYnnuy5vfh\ngqb2gOFMrF4HhLp/zn9G6pXJP5WKN9BlzKxKf/5Wq9ZP+6OXoZTJ/13atirt\nfc9zM2MCWCpIOiwDaCK6TSnGO+ieRD0PWw3O1CCTaPbS7XDwnoUiaoRmHH+U\nXx02uB4Qg/Qx1XLwxqtz5fUJogTfBYej+8D6FIq1QYUlZ5O8g7lvD+4hK1BZ\nvbFfXyYr6t0nR9DouplK3rcRnUfZEE+PJ1A4VvZ2EmguXZYZNcQmAGeg1tcC\nhV2BlJYqeL/7ypVdOqPERasDfh5AV6of2xjytIplAmK5LAEZNrsNkGrkaLpM\nPXI7QUi9aEY+6epkyg8dwhsjcMbqPvqhPXGWoyh20oecfdP0pXsvN9yaxwOJ\n97Nl0pDJAuWQBxaoEMhdmnrnFivOpkOPR2aMPs5Dk4NOFfogs9nvYBeeTp2P\nv7xRTofHPl5FD0DMrutFuId+zdzVm5IitYVHAZK2n4uHYsk4kFWHiV+VSTfy\n5WABBWiTK2v2QiVzbuqyE7NlTKXfVDnGklvbzEzEI4cSFjLN6VTV7HhieKt8\nUdJ5C0ZyGUBzhzJmb3f5XbfpvvGxb0cki7SAA3MvhLOve1Lf3yBXHbMMdN5O\nqgsJrYKmU5E1nyOGY4XNTyE5QyQhrAyM30G6grbP+e5EPblHw84wewa/bhIo\n5clv\r\n=CmeU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4Qnrlf7QqEcpkGFmmFcEt8nM9iHDNtMuRRp8T8JYIBAiEAo8MZjgiYP2aD8Q4W+vPdOnMfX+o4+rbwRI93PqHu+2o="}]},"maintainers":[{"name":"derhuerst","email":"mail@jannisr.de"}],"_npmUser":{"name":"derhuerst","email":"mail@jannisr.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flow-of-computations_0.1.0_1561220943557_0.44283264464379113"},"_hasShrinkwrap":false},"0.1.1":{"name":"@derhuerst/flow-of-computations","description":"Filter, transform and merge sets of data.","version":"0.1.1","main":"index.js","author":{"name":"Jannis R","email":"mail@jannisr.de"},"homepage":"https://github.com/derhuerst/todo-name","repository":{"type":"git","url":"git+https://github.com/derhuerst/todo-name.git"},"bugs":{"url":"https://github.com/derhuerst/todo-name/issues"},"license":"ISC","engines":{"node":">=8"},"dependencies":{"find-cycle":"^1.0.0","lodash":"^4.17.11","tinyqueue":"^2.0.3"},"devDependencies":{"benchmark":"^2.1.4"},"gitHead":"8a0faeb274c6cc2ee9118f118b4cdebff0e2a381","_id":"@derhuerst/flow-of-computations@0.1.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-VoOfcQ2DXFZnG7zhRsWa8FQ3pcA7kw/FOYra6AnNqIsb+kQsHhK1ZTxNQcqQsQ8nkHXYJLCbvrcDZMICZD5/7w==","shasum":"6b361d8ea2aa2b70340878aa4f59c860a67daba4","tarball":"https://registry.npmjs.org/@derhuerst/flow-of-computations/-/flow-of-computations-0.1.1.tgz","fileCount":7,"unpackedSize":11231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdD+hQCRA9TVsSAnZWagAAIHgQAKA0vXW+UTEDzLzW9S7H\na2fH1Fwt9Ryif/sZQldTD7AuOx8C+Vm7ExtZ5rte1Ne2iz2mJbENfQ03Qbmu\ncq34mRWV3fnzcR3qFZkfmR3tik9NwlxoizGLMFijj2sPCV2DRMCtHuxbSram\nMjvnFvKTXOI0shuhbWsFx1GDBi8puR+AUxne2etpnFzT9x7Ec0ZJukO1rjOj\nzc0rsydtPuFMNasiGcYu7136SzqQ7MKQVA/zEyKJ2mnF1J7GVP5Kfi3Gc0N4\nzEhBjMpn5ZUZS1log9UiAZCTyDkU5sd0nMCp97PtNUyLTag1Whc6smF8m7Oz\ntFWk4N3PROcdYWyht2QFcTgI0ntIwjVvePbtP9rVCqKHd2K5PfaaMJbBhRm4\n4sK09snTeGeyr0QrzqAH/0K/vE/429nhAITsHA5WcSNLw8UI99EKC8mRgdfj\nH4R0SzChtvRKekpCraQIV2JRdQp5vJtvHHDg1nKqudDV/HzEZ39dhcqxA/29\ncU0/i6EvjhvNrdkZNBc2zSzsGt4OqMJ0YG/kBU82C9OJsaPbYVhDt6jb4XN2\nOKTztzSuP8ldAeScVAeOj6Sw3G1vJEPY4kcMO8FyyP75HPGsFjuh2eOKB347\n2Jrj2saB2PI0Jbzh9I6ay6T9uQ4CB+Z6UHdeX0dEbl78L0akikipDNZhhUgT\nXKAn\r\n=C5n4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDjcNLvHPrGfdRhInHOH8Vf3xeI27rGCN4z4fWqgesYFAiEA6u3RHHjYZLpBL0suhhzfT8OFHfzuZ8R6abhdSOAPvW0="}]},"maintainers":[{"name":"derhuerst","email":"mail@jannisr.de"}],"_npmUser":{"name":"derhuerst","email":"mail@jannisr.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flow-of-computations_0.1.1_1561323600130_0.9374323978460348"},"_hasShrinkwrap":false},"0.1.2":{"name":"@derhuerst/flow-of-computations","description":"Filter, transform and merge sets of data.","version":"0.1.2","main":"index.js","author":{"name":"Jannis R","email":"mail@jannisr.de"},"homepage":"https://github.com/derhuerst/todo-name","repository":{"type":"git","url":"git+https://github.com/derhuerst/todo-name.git"},"bugs":{"url":"https://github.com/derhuerst/todo-name/issues"},"license":"ISC","engines":{"node":">=8"},"dependencies":{"find-cycle":"^1.0.0","lodash":"^4.17.11","tinyqueue":"^2.0.3"},"devDependencies":{"benchmark":"^2.1.4"},"gitHead":"a8783c2d28646a36c7ffc2872deaf11cba0cfa72","_id":"@derhuerst/flow-of-computations@0.1.2","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-MvQPi1jGxRHJDCRXPd1w/tqa2O/X03rrz7v/KBv3aI83Lirsvaketi1nxDICyZtfit0BHazTOMMb9f6hvb0Qcg==","shasum":"7a00e4f44d6b9ff26eb5f409060d8810b75ab514","tarball":"https://registry.npmjs.org/@derhuerst/flow-of-computations/-/flow-of-computations-0.1.2.tgz","fileCount":7,"unpackedSize":11233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdD+0fCRA9TVsSAnZWagAArLAP/jhkDMqagT5BYOkZWRuU\nJLa9SNwA0UcE8aSDxHICDoNWRveEXxmJRZukovk9wrqDj7KLQk16KRthHobr\nANSrqx9KJbGQCWo50jXwnRxNEY6yioeL9C7eRdxvbt488Zn6yYomFjxoN0Mb\nitfgoDvqOkceBcyCikSXYw1l6Ntgc2of7Efvg04z13oCZlSkHYaGbcw8nbnF\nPeYb5ROY8aHKvEepOkhgWTx2xkXwgIYHtOq6DEH8KW+gKxq8Hf0egW/2Inao\nsAbwJJAkXEcDzzDXdN4Od8JrCY82KxPXLvcIOdJC6h8JygHxSbRUJQO34ZeM\nl33HDT0tv7oZOLq0UjxYzE92ki9mnlfPJLAN4iL17QnCpjsPFtUhed6yqkUz\nTIGaYrmBSk+xMFTv0oxDtnthD5ZhStyJIiQyy00+0dSpk+CzJ5WQbeEuTmEL\nOhdugo4QiXdn+GWeg0C19gHc3r01U1IyeB4q9umShSF6Qt9tv0bOB5TI792V\n1LO+kQiRRVK15/j/Q6y2o7hrAmRbCSliny2jDgd27DwD1QuY+KU2AEE6Dg5h\nDug3qILple11npcFgFxfHy/sk85f+Fl1mLPQW3gB4cSv2GWzmAqSTw+yZSqZ\nltyVukZNz4DywDzbZmIOmr1DiJpM4QN/0jXNPXZLTJEBPu3aZt7WaQ7H9EbA\nKjGz\r\n=iSW5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEe9sl8yWykCvgQB9jbgh+v8iJpovk/StBqU2i9gZFvRAiEAmn+V4exU+mXx1oQCHH80v1UAdwMfWxBUCpSPVa22ZtI="}]},"maintainers":[{"name":"derhuerst","email":"mail@jannisr.de"}],"_npmUser":{"name":"derhuerst","email":"mail@jannisr.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flow-of-computations_0.1.2_1561324830560_0.7146627384313062"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-22T16:29:03.523Z","0.1.0":"2019-06-22T16:29:03.675Z","modified":"2022-04-05T03:48:36.205Z","0.1.1":"2019-06-23T21:00:00.266Z","0.1.2":"2019-06-23T21:20:30.689Z"},"maintainers":[{"name":"derhuerst","email":"mail@jannisr.de"}],"description":"Filter, transform and merge sets of data.","homepage":"https://github.com/derhuerst/todo-name","repository":{"type":"git","url":"git+https://github.com/derhuerst/todo-name.git"},"author":{"name":"Jannis R","email":"mail@jannisr.de"},"bugs":{"url":"https://github.com/derhuerst/todo-name/issues"},"license":"ISC","readme":"# `@derhuerst/flow-of-computations`\n\n**Filter, transform and merge sets of data.**\n\n- A [directed acyclic graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph) of operations. Each operation gets data from its `>=1` predecessors and transforms it.\n- Data sources can be static or streaming/live, as they emit diffs (looks like a[`splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) call) just like every operation.\n- The computation of the whole graph is done step by step via an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterators).\n\n[![npm version](https://img.shields.io/npm/v/@derhuerst/flow-of-computations.svg)](https://www.npmjs.com/package/@derhuerst/flow-of-computations)\n[![build status](https://api.travis-ci.org/derhuerst/@derhuerst/flow-of-computations.svg?branch=master)](https://travis-ci.org/derhuerst/@derhuerst/flow-of-computations)\n![ISC-licensed](https://img.shields.io/github/license/derhuerst/@derhuerst/flow-of-computations.svg)\n![minimum Node.js version](https://img.shields.io/node/v/berlin-postal-code-areas.svg)\n[![chat with me on Gitter](https://img.shields.io/badge/chat%20with%20me-on%20gitter-512e92.svg)](https://gitter.im/derhuerst)\n[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)\n\n\n## Installation\n\n```shell\nnpm install @derhuerst/flow-of-computations\n```\n\n\n## Usage\n\n```js\nconst {withStore, createFlow, flowRunner} = require('@derhuerst/flow-of-computations')\nconst {add, zip, sum, print} = require('@derhuerst/flow-of-computations/ops')\n\n// Our data sources, called inputs. Each is a list of diffs.\nconst dataSourceA = [\n\t[0, 0, [10, 20, 30]], // insert 10, 20, 30\n\t[1, 1, [50]] // replace 2nd by 50\n] // evaluates to [10, 50, 30]\nconst dataSourceB = [\n\t[0, 0, [10, 100, 1000]] // insert 10, 100, 1000\n] // evaluates to [10, 100, 1000]\n\n// Use withStore to access the data of an operation (all diffs \"applied\") at any time.\nconst sumOp = withStore(sum())\n\nconst zipOp = zip(2)\nconst flow = createFlow([ // list of data sources\n\tdataSourceA, dataSourceB\n], [ // list of op connections\n\t[dataSourceA, add(3), zipOp],\n\t[dataSourceB, zipOp],\n\t[zipOp, sumOp, print('diff printer')]\n])\n\n// Because our data sources are static, we can use a loop to iterate over each step of\n// the computation.\nfor (const _ of flowRunner(flow)) {}\nconsole.log('data in sumOp:', sumOp.data())\n```\n\n```\ndiff printer { idx: 0, del: 0, newItems: [ 13, 23, 33 ] }\ndiff printer { idx: 0, del: 3, newItems: [ 23, 123, 1033 ] }\ndiff printer { idx: 0, del: 3, newItems: [ 23, 153, 1033 ] }\ndata in sumOp: [ 23, 153, 1033 ]\n```\n\n\n## Contributing\n\nIf you have a question or need support using `@derhuerst/flow-of-computations`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/@derhuerst/flow-of-computations/issues).\n","readmeFilename":"readme.md"}