assistan-ts
Version:
A typesafe and code-first library to define and run OpenAI assistants
14 lines • 363 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.groupBy = void 0;
const groupBy = (arr, keySelector) => {
const res = {};
arr.forEach((it) => {
const key = keySelector(it);
if (!res[key])
res[key] = it;
});
return res;
};
exports.groupBy = groupBy;
//# sourceMappingURL=utils.js.map