josephg / josephg/ShareJS

Use Promises

Open
#268 15 comments 0 reactions 0 assignees View on GitHub
discuss
Dominant language
JavaScript
Stars
5k
Forks
454
PR merge metrics
No merged PRs in 30d

Description

There is a lot of asynchronous code in ShareJS. Almost all methods of the public api use callbacks and many internal methods do, too.

[Promises](http://promisesaplus.com) would be a [good way](http://blog.jcoglan.com/2013/03/30/callbacks-are-imperative-promises-are-functional-nodes-biggest-missed-opportunity/) to deal with this. Of course one should be a able to use the callback-style api if not familiar with promises. But with helpers like [`nodeify()`](https://github.com/then/promise#promisenodeifycallback) we could offer both.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.