@FabrizioRuggeri/

ReactiveNodeStreams

Nodejs

No description

fork
loading
Files
  • index.js
  • businessLogic.js
  • composed.js
  • DB.js
  • oldFashion.js
  • reactiveStreams.js
  • streamUtils.js

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.056557704330607805","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Y29uc3Qgc3VtUmljaFRyYW5zYWN0aW9uc09sZEZhc2hpb24gPSByZXF1aXJlKCcuL29sZEZhc2hpb24nKTsKY29uc3Qgc3VtUmljaFRyYW5zYWN0aW9uc1N0cmVhbXMgPSByZXF1aXJlKCcuL3JlYWN0aXZlU3RyZWFtcycpOwpjb25zdCBzdW1SaWNoVHJhbnNhY3Rpb25zQ29tcG9zZWQgPSByZXF1aXJlKCcuL2NvbXBvc2VkJyk7Cgpjb25zdCBtYWluID0gYXN5bmMgKCkgPT4gewoJY29uc29sZS5sb2coJ0xvYWRpbmcgYWxsIGRhdGEgaW4gbWVtb3J5Jyk7Cgljb25zb2xlLmxvZyhhd2FpdCBzdW1SaWNoVHJhbnNhY3Rpb25zT2xkRmFzaGlvbigpKTsKCgljb25zb2xlLmxvZygnXG5Vc2luZyBzdHJlYW1zJyk7Cgljb25zb2xlLmxvZyhhd2FpdCBzdW1SaWNoVHJhbnNhY3Rpb25zU3RyZWFtcygpKTsKCiAgY29uc29sZS5sb2coJ1xuVXNpbmcgY29tcG9zaXRpb24nKTsKCWNvbnNvbGUubG9nKGF3YWl0IHN1bVJpY2hUcmFuc2FjdGlvbnNDb21wb3NlZCgpKTsKfTsKCm1haW4oKTsK"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const sumRichTransactionsOldFashion = require('./oldFashion');
const sumRichTransactionsStreams = require('./reactiveStreams');
const sumRichTransactionsComposed = require('./composed');

const main = async () => {
	console.log('Loading all data in memory');
	console.log(await sumRichTransactionsOldFashion());

	console.log('\nUsing streams');
	console.log(await sumRichTransactionsStreams());

  console.log('\nUsing composition');
	console.log(await sumRichTransactionsComposed());
};

main();
node v10.16.0