Created
January 21, 2015 16:54
-
-
Save Chadtech/1769c4e7aaa601102639 to your computer and use it in GitHub Desktop.
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
if options.flowControl or options.flowcontrol | |
fc = options.flowControl or options.flowcontrol | |
if typeof fc is "boolean" | |
options.rtscts = true | |
else | |
fc.forEach (flowControl) -> | |
fcup = flowControl.toUpperCase() | |
idx = FLOWCONTROLS.indexOf(fcup) | |
if idx < 0 | |
err = new Error("Invalid \"flowControl\": " + fcup + ". Valid options: " + FLOWCONTROLS.join(", ")) | |
callback err | |
else | |
# "XON", "XOFF", "XANY", "DTRDTS", "RTSCTS" | |
switch idx | |
when 0 | |
options.rtscts = true | |
console.log "still going" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment