61 |
|
|
62 |
// modified binary search to find first element with substring |
// modified binary search to find first element with substring |
63 |
function binarySearch(arr, find) { |
function binarySearch(arr, find) { |
64 |
if (!arr || |
if (!arr || typeof (find) == "undefined" || !arr.length) { |
|
typeof (arr) != "object" || |
|
|
typeof (find) == "undefined" || !arr.length) { |
|
65 |
return null; |
return null; |
66 |
} |
} |
67 |
var low = 0; |
var low = 0; |
153 |
} |
} |
154 |
|
|
155 |
results(html); |
results(html); |
|
} else { |
|
|
// clean results list |
|
|
// results("",1); |
|
156 |
} |
} |
157 |
|
|
158 |
} |
} |