Skip to content

Instantly share code, notes, and snippets.

@trustmaster
Last active June 6, 2016 15:57
Show Gist options
  • Save trustmaster/8c78302548a3c2f8ee0e0a2fe520fca5 to your computer and use it in GitHub Desktop.
Save trustmaster/8c78302548a3c2f8ee0e0a2fe520fca5 to your computer and use it in GitHub Desktop.
Ignore brackets in Process API
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