Created
September 27, 2014 16:35
-
-
Save bendrucker/9e175261444492c69c46 to your computer and use it in GitHub Desktop.
Over-organization of code is no good
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var messages = require('./src'); | |
| // do this | |
| module.exports = messages.extract() | |
| .tap(function (messages) { | |
| console.log('Retrieved %d messages', messages.length); | |
| }) | |
| .then(messages.transform) | |
| .done(messages.load); | |
| // this is silly | |
| function logLength (messages) { | |
| console.log('Retrieved %d messages', messages.length); | |
| } | |
| module.exports = messages.extract() | |
| .tap(logLength) | |
| .then(messages.transform) | |
| .done(messages.load); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment