1 # Standard javascript indexOf. Implemented here because not all browsers support it.
2 _indexOf = (array, item) ->
8 indexOf = (array, item) ->
10 # The browser supports indexOf
11 return array.indexOf(item)
14 return _indexOf(array, item)
17 return typeof n is 'number' and n % 1 == 0
21 return typeof v == 'function'
24 # Escape a string for HTML interpolation; copied from underscore js
25 html_escape = (string) ->
27 .replace(/&/g, '&')
28 .replace(/</g, '<')
29 .replace(/>/g, '>')
30 .replace(/"/g, '"')
31 .replace(/'/g, ''')
32 .replace(/\//g,'/')
35 getBoolString = (value) ->
44 getBoolString: getBoolString
45 html_escape: html_escape
48 isFunction: isFunction