2 ms·
May I start a meta-discussion about asyncronous helpers? Personally I find Seq less readable than normal cascading functions and even less readable than the goo
by philjackson 15y ago
May I start a meta-discussion about asyncronous helpers? Personally I find Seq less readable than normal cascading functions and even less readable than the good, old async library. Here's what the example would look like for async in coffeescript:
seq = [ ]
seq.push ( cb ) -> read prompt: 'Username: ', cb
seq.push ( cb ) -> read prompt: 'Password: ', silent : true, cb
async.series seq, ( err, [ username, password ] ) ->
console.log "#{username}, '#{password}'."
process.stdin.destroy()
Very readable and very simple.