1
2
3
4
5
6
7
8
9
10
11
import { repoFrenchCity } from "https://esm.town/v/yo_0/repoFrenchCity";
export async function autocompleteCityByName({ input }) {
const results = [];
for (var i = 0; i < repoFrenchCity.length; i++) {
if (input === repoFrenchCity[i].name.slice(0, input.length)) {
results.push(repoFrenchCity[i]);
}
}
return results;
}