cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject [Node 101] Part 2: Avoid the Triangle of Doom
Date Thu, 12 Dec 2013 23:11:14 GMT
Flatten your async code. New fashion advocates promises, generators,
events, or one of the streams apis.

The classic method is to write small testable modules (see part 1) and
flatten your tree.

Turn code that looks like this [1] into this [2].

[1]
https://github.com/apache/cordova-js/blob/b75096a1bade9ca6aa0d38a2039fd922ad7c1a95/test/runner.js#L99-L136
[2]
https://github.com/apache/cordova-js/blob/ced04a4ec71f144dd2cd6c2e9392e3b1fc725ec1/tasks/lib/test-browser.js

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message