(arr, item)
| 4 | } |
| 5 | |
| 6 | function arrayContains(arr, item) { |
| 7 | if (!Array.prototype.indexOf) { |
| 8 | var i = arr.length; |
| 9 | while (i--) { |
| 10 | if (arr[i] === item) { |
| 11 | return true; |
| 12 | } |
| 13 | } |
| 14 | return false; |
| 15 | } |
| 16 | return arr.indexOf(item) != -1; |
| 17 | } |
| 18 | |
| 19 | function scriptHint(editor, keywords, getToken) { |
| 20 | // Find the token at the cursor |