You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Suggestions from community:
Allow fh-sync-js to be promisified, by verifying and correcting api.
Provide promisified version of the api (separate for compatibility with the old one.
agree that we shouldn't mix promises in occasionally. The API should support one or the other, or both, but not a half-hearted mix. And for the record, promisify won't work with most sync (and other FH) functions, as they don't follow the standard single function (err, result) format.
That being said, my professional opinion is that you guys are going to be on the wrong side of history in callbacks vs promises. Most (popular, larger) libraries I see, if they support callbacks, generally support promises as well: if you provide a callback, it'll use that, otherwise it'll return a Promise. mongodb does this. It's really trivial if the inner workings of your library are promise-based, but mongodb also accomplishes it even though most of their internals are callback-based.
In my experience with people I've talked to, callbacks are generally deemed "legacy code" these days. There's a reason the mz library has nearly a million downloads per month. request-promise has double that. In addition to all the benefits of promises that Evan and I have probably stated ad nauseam, native async/await is just around the corner. Many shops have already been using them successfully with either Babel or TS, and callbacks-only API is completely incompatible with them."
Tasks
Change callback definitions to in order to be promissified on demand.
Provide promise based api
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Motivation
Suggestions from community:
Allow fh-sync-js to be promisified, by verifying and correcting api.
Provide promisified version of the api (separate for compatibility with the old one.
Quote from: #29
Tasks
The text was updated successfully, but these errors were encountered: