Closed madarche closed 11 years ago
@madarche Great thanks, for that.
I'm however reluctant to take this.
deferred.promise
not deferred.promise()
, technically it will work, but good example should do return deferred.promise
.We definitely need some examples list, and examples folder is a good idea, but maybe it would be better to start with something less obvious, like, how to work with Mongoose, how to write while
loops. How to work with array of promises. Something that will solve real head scratchers.
If you feel you can improve that, I'll be willing to take it. Otherwise let's agree that, in next days I write few good examples for examples folder, and then I'll be open to take fixed mocha example from you as an addition.
Hello @medikoo, thanks for your reply.
deferred.promise
. I'm glad to have had your proofreading.Sorry for those problems and I'll provide you with another pull request with the problematic points hopefully fixed.
Cheers
@madarche I introduced examples in a README.md and added first while loop example, still If you feel README can be better I'm open for that.
I'd like to take your improved Mocha example. We can use same pull request (I've reopened the ticket), and it'll be great to fill this folder with more usable examples, so if you have other good cases in a sleeve, I'll be more than happy to include them.
@madarche I'm gonna close it for now, please reopen when you have examples ready. Thanks!
Sorry for the delay, I've got the file fixed and ready to be contributed. But I haven't the right to reopen this pull request. Could you reopen it please?
@madarche thanks, I've taken it in. I've actually also fixed formatting so it matches the conventions of the project. Some notes:
done
instead of then
. It behaves same way as you constructed but one (obsolete) promise less is created :)@medikoo I am keeping in mind all your recommendations and will follow them. And thanks again for your very helpful and appreciated proofreading. They help fixing/improving the projects that use deferred I'm working on.
Hello Mariusz,
Here is an example folder with a first example to start with.
I would like to provide more examples in the future.
Best regards,