Last active
June 6, 2016 15:57
-
-
Save trustmaster/8c78302548a3c2f8ee0e0a2fe520fca5 to your computer and use it in GitHub Desktop.
Ignore brackets in Process API
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
process: (input, output) -> | |
# Drop brackets | |
if input.ip.type isnt 'data' | |
buf = if input.scope isnt null then input.port.scopedBuffer[input.scope] else input.port.buffer | |
return buf.pop() | |
# Then do whatever you want with data packets, e.g. | |
data = input.getData 'foo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment