Files
vulture/client/coffee/filters.coffee
T

17 lines
430 B
CoffeeScript

root = this;
root.filters.filter 'escape', () ->
return window.escape;
root.filters.filter 'replaceAllCommasBySpaces', () ->
return (text) ->
return text.replace(new RegExp(",","g"), " ")
root.filters.filter 'niceJSON', () ->
return (obj) ->
return JSON.stringify(obj, null, 4);
root.filters.filter 'replaceReturnByBreak', () ->
return (text) ->
return text.replace(new RegExp("\n","g"), "<br>")