by renekooi · 11y ago · 0 comments
connection.call('collection', 'users')
is a shorthand for: connection.then(value => value.collection('users'))It doesn't look like native promises support this unfortunately: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Another nitpick I have with native promises is that they require an extra level of nesting to get the resolve callback.
// How it is now
new Promise(function(resolve, reject) {
resolve('done');
});
// vs. What most libraries implement
var p = new Promise();
p.resolve(function() {
return 'done';
});Regardless - nice comment.