Permalink
Browse files

Coding standards fixes

  • Loading branch information...
1 parent f032895 commit e57ada47d38e3a4fb7eaa7ff1aec9ca4e1032683 @bergie bergie committed Apr 9, 2013
@@ -1,7 +1,8 @@
noflo = require '../../lib/NoFlo'
class CollectUntilIdle extends noflo.Component
- description: 'Collect packets and send them when input stops after a given timeout'
+ description: 'Collect packets and send them when input stops
+after a given timeout'
constructor: ->
@milliseconds = 500
@data = []
@@ -28,7 +28,8 @@ class SliceArray extends noflo.Component
@outPorts.out.disconnect()
sliceData: (data) ->
- return @outPorts.error.send "Data #{typeof data} cannot be sliced" unless data.slice
+ unless data.slice
+ return @outPorts.error.send "Data #{typeof data} cannot be sliced"
sliced = data.slice @begin, @end unless @end is null
sliced = data.slice @begin if @end is null
@outPorts.out.send sliced
@@ -1,7 +1,8 @@
noflo = require "../../lib/NoFlo"
class Split extends noflo.Component
- description: "This component receives data on a single input port and sends the same data out to all connected output ports"
+ description: "This component receives data on a single input port and sends
+the same data out to all connected output ports"
constructor: ->
@inPorts =
@@ -16,7 +16,9 @@ class SplitStr extends noflo.Component
@outPorts =
out: new noflo.Port()
@inPorts.delimiter.on "data", (data) =>
- if data.substr(0, 1) is '/' and data.substr(data.length - 1, 1) is '/' and data.length > 1
+ first = data.substr 0, 1
+ last = data.substr data.length - 1, 1
+ if first is '/' and last is '/' and data.length > 1
# Handle regular expressions and not simply a slash
data = new RegExp data.substr 1, data.length - 2
@delimiterString = data

0 comments on commit e57ada4

Please sign in to comment.