(possibilities, input)
| 48 | }; |
| 49 | |
| 50 | function closestString(possibilities, input) { |
| 51 | var closest; |
| 52 | for (var i = possibilities.length - 1, distance_min = Infinity; i >= 0; i--) { |
| 53 | var next_dist = fl.get(possibilities[i], input); |
| 54 | if (next_dist < distance_min) { |
| 55 | closest = possibilities[i]; |
| 56 | distance_min = next_dist; |
| 57 | } |
| 58 | } |
| 59 | return closest; |
| 60 | } |
| 61 | |
| 62 | // let prototypes declared below in this file be initialized |
| 63 | process.nextTick(function () { |
no outgoing calls
no test coverage detected