Created
November 9, 2013 05:44
-
-
Save jots/7382177 to your computer and use it in GitHub Desktop.
icedcoffeescript question
This file contains 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
# can await be made to not return from function until it is done? | |
fs = require("fs") | |
readfile = (fn) -> | |
await fs.readFile fn, "utf8", defer(err,res) | |
#console.log "res: ", res | |
return res | |
a = readfile("dbtest.coffee") | |
console.log a # a is undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turtles all the way up: