Snapshot of JacksonTian/eventproxy: 2.9k★, JavaScript. An implementation of task/event based asynchronous pattern.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
var ep = EventProxy.create('tpl', 'data', function (tpl, data) {
// TODO
});
以上方法等效于
var ep = new EventProxy();
ep.all('tpl', 'data', function (tpl, data) {
// TODO
});
重复异步协作
此处以读取目录下的所有文件为例,在异步操作中,我们需要在所有异步调用结束后,执行某些操作。
var ep = new EventProxy();
ep.after('got_file', files.length, function (list) {
// 在所有文件的异步执行结束后将被执行
// 所有文件的内容都存在list数组中
});
for (var i = 0; i < files.length; i++) {
fs.readFile(files[i], 'utf-8', function (err, content) {
// 触发结果事件
ep.emit('got_file', content);
});
}
var ep = new EventProxy();
ep.after('got_file', files.length, function (list) {
// 在所有文件的异步执行结束后将被执行
// 所有文件的内容都存在list数组中,按顺序排列
});
for (var i = 0; i < files.length; i++) {
fs.readFile(files[i], 'utf-8', ep.group('got_file'));
}
JacksonTian/eventproxy has 2.9k GitHub stars — refresh the page for the live number, or check github.com/JacksonTian/eventproxy. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is JacksonTian/eventproxy open source?
TopGit's metadata for JacksonTian/eventproxy does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is JacksonTian/eventproxy?
JacksonTian/eventproxy (JacksonTian/eventproxy) is a JavaScript project on GitHub. From the project's own README: An implementation of task/event based asynchronous pattern.
Where can I see JacksonTian/eventproxy in action?
The project maintains a homepage at http://html5ify.com/eventproxy. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about JacksonTian/eventproxy?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/JacksonTian/eventproxy is the definitive source.
Read full README in the tab above.
Is eventproxy worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of eventproxy.