Skip to content

Instantly share code, notes, and snippets.

@woodworker
Created September 20, 2013 18:57
Show Gist options
  • Save woodworker/6642173 to your computer and use it in GitHub Desktop.
Save woodworker/6642173 to your computer and use it in GitHub Desktop.
FilterByBalue test
test = require "noflo-test"
test.component("packets/FilterByValue").
discuss("given the value, indicating the outport of the filtered value").
send.connect("filterValue").
send.data("filterValue", 1).
send.disconnect("filterValue").
discuss("provide some data packets").
send.connect("in").
send.data("in", 0).
send.data("in", 1).
send.data("in", 2).
send.data("in", 1.5).
send.data("in", 0.5).
send.disconnect("in").
discuss("get only the passed ones").
receive.data("lower", 0).
receive.data("equal", 1).
receive.data("higher", 2).
receive.data("higher", 1.5).
receive.data("lower", 0.5).
export module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment