hayata-yamamoto / promise-observers Goto Github PK
View Code? Open in Web Editor NEWPromise recoding tool for typescript
Home Page: https://hayata-yamamoto.github.io/promise-observers/
License: MIT License
Promise recoding tool for typescript
Home Page: https://hayata-yamamoto.github.io/promise-observers/
License: MIT License
https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled
基本は、promise.all の時と同じでいいが、引き渡された関数をそのまま await するんじゃなくて、うまいことキャプチャーして IF は Promise.allSettled と同じまま集計できるようにする
#3 と大体方針は一緒。非同期で処理が動いてしまうため、Promise.any に引き渡す段階で結果がキャプチャーされるようにしておく
Capture した値の統計量や実際に保存されている値を確認するための機能の追加。主にテスト用
制約条件
実現したいこと
object に capture した結果を保存して、結果を集計できるようにする。非同期で大量に書き込みが来る可能性があるため、適宜キューを入れるなどして順番が正しく制御されるようにする必要がある
あと、集計値は min, max, avg, std, var, count, total あたりがあれば十分。キー別に集計して都度都度更新するようなイメージ。
並列に大量に Promise が実行されて、キューイングされて、キューのオブザーバーが適宜オブジェクトを更新という流れの想定
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.