TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Easy node.js programming

4 pointsby abssover 11 years ago

3 comments

abssover 11 years ago
var harvest = require(&quot;harvests&quot;).create();<p><pre><code> harvest.let(&#x27;father&#x27;, loadPenguin, &#x27;MrPenguin&#x27;); harvest.let(&#x27;mother&#x27;, loadPenguin, &#x27;MrsPenguin&#x27;); harvest.let(&#x27;family&#x27;, loadPenguinFamily, wait(&#x27;father&#x27;), wait(&#x27;mother&#x27;)); harvest.do(function(family){ console.log(family); &#x2F;&#x2F;also in harvest.father, harvest.mother, harvest.family you got values }, wait(&#x27;family&#x27;) ); harvest.onFail(function(error, variable, index){ console.log(&quot;Well, move those penguins to the South Pole...&quot;, error, variable, index); });</code></pre>
abssover 11 years ago
Harvests: asynchronous programming as would be synchronous. Simpler alternative to promises and control flow libraries!
salboaieover 11 years ago
Promoses and flow libraries have steep learning curve