Can now use pipeline as query

This commit is contained in:
didier amyot committed 2015-05-25 12:07:43 -04:00
1 parent 41552040cc
commit e305aa8f2a
16 files changed
+323 -123

No files matched your search

+4 -2
View File
@@ -6,7 +6,9 @@ root.filters.filter 'escape', () ->
root.filters.filter 'replaceAllCommasBySpaces', () ->
return (text) ->
return text.replace(new RegExp(",","g"), " ")
if _.isString(text)
return text.replace(new RegExp(",","g"), " ")
return text
root.filters.filter 'niceJSON', () ->
return (obj) ->
@@ -21,4 +23,4 @@ root.filters.filter 'onlyNthLines', () ->
if not _.isString(text)
return ""
s = text.split("\n")
return s[0...n].join("\n")
return s[0...n].join("\n")