(array, value, score)
| 763 | } |
| 764 | |
| 765 | function insertSorted(array, value, score) { |
| 766 | var pos = 0, |
| 767 | priority = score(value) |
| 768 | while (pos < array.length && score(array[pos]) <= priority) { |
| 769 | pos++ |
| 770 | } |
| 771 | array.splice(pos, 0, value) |
| 772 | } |
| 773 | |
| 774 | function nothing() {} |
| 775 |
no test coverage detected