Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Created September 29, 2015 22:24
Show Gist options
  • Save Chadtech/37fb30a4bc3e23e3b0f6 to your computer and use it in GitHub Desktop.
Save Chadtech/37fb30a4bc3e23e3b0f6 to your computer and use it in GitHub Desktop.
sys = require 'util'
stdin = process.openStdin()
console.log 'hell ye type codes n shit'
stdin.addListener 'data', (d) ->
console.log 'ye dope ', d.toString().trim()
# Your terminal will read the following, with the input 'ye \n dope \n'
# hell ye type codes n shit
# ye
# ye dope ye
# dope
# ye dope dope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment