You should be able to get them all, even if they are registered in multiple ways?
You should be able to get them all, even if they are registered in multiple ways?
Set, which will collapse them into a single unique instanceSet, so that you then dedupe themlist() returns at max 1k keys at a time. You can then paginate through it to get the rest
.invalid is promised to not exist, right?const { keys } = await env.KV.list();
const ips = new Set();
for(const { name } of keys) {
ips.add(await env.KV.get(name));
}
console.log(Array.from(ips.values()));const ips = new Set();
let cursor = undefined;
while(true) {
const result = await env.KV.list({ cursor });
for(const { name } of result.keys) {
ips.add(await env.KV.get(name));
}
if(result.list_complete) {
break;
}
cursor = result.cursor;
}
console.log(Array.from(ips.values()));