medikoo / deferred

Modular and fast Promises implementation for JavaScript
ISC License
364 stars 20 forks source link

Add another while loop simpler example #14

Closed madarche closed 11 years ago

madarche commented 11 years ago

Could another "while loop example", such as https://github.com/medikoo/deferred/blob/master/examples/while-loop.js, but much simpler be added please?

Ideally that example would just print something while a counter is running, and that example could also be run as such, ie just node example.js without any missing part.

Best regards,

medikoo commented 11 years ago

Good idea, also having examples runnable without any extra code tweaking is right direction.

I'll prepare something better

medikoo commented 11 years ago

I renamed initial while loop example to gather-paginated-search-results.js, and added simple while-loop.js example, take a look and let me know if it's readable in that form, maybe it can be done better :)

madarche commented 11 years ago

The new while-loop.js example is perfect! Thanks a lot!