Created
April 28, 2013 06:14
-
-
Save mde/5476069 to your computer and use it in GitHub Desktop.
Templater race
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
templater.addListener('data', function (data) { | |
// Buffer for now, but we could stream | |
content += data; | |
}); | |
templater.addListener('end', function () { | |
if (self.params.action == 'test') { | |
if (content.indexOf('Hello') > -1) { | |
console.log(self.params.action); | |
throw new Error(); | |
} | |
} | |
callback(content); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment