2 # Public: Determines if a string should be considered linewise or character
4 # text - The string to consider
6 # Returns 'linewise' if the string ends with a line return and 'character'
9 if text.lastIndexOf("\n") is text.length - 1
11 else if text.lastIndexOf("\r") is text.length - 1