prepare PropertyValueList and FilteredList

This commit is contained in:
marlon-erler
2024-07-25 01:28:55 +02:00
parent cb9a79a10d
commit 9e5ca1a063
3 changed files with 61 additions and 18 deletions
-18
View File
@@ -330,17 +330,6 @@
}
};
};
function collectObjectValuesForKey(key, converter, objects) {
const values = /* @__PURE__ */ new Set();
for (const object of objects) {
const stringEntryObject = converter(object);
const stringEntryObjectValue = stringEntryObject[key];
if (stringEntryObjectValue == void 0 || stringEntryObjectValue == "")
continue;
values.add(stringEntryObjectValue);
}
return [...values.values()];
}
var IndexManager = class {
itemToString;
sortedStrings = [];
@@ -3527,13 +3516,6 @@
};
// src/index.tsx
console.log(
collectObjectValuesForKey("test", (x) => x, [
{ test: "hello" },
{ test: "123" },
{ test: "hello" }
])
);
var storageModel = new StorageModel();
var settingsModel = new SettingsModel(storageModel);
var connectionModel = new ConnectionModel(storageModel);