sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
13 lines (12 loc) • 319 B
JavaScript
import { uniqBy } from "lodash-es";
function uniqueProjectIdDataset(workspaces) {
return uniqBy(workspaces.map((w) => ({
key: `${w.projectId}-${w.dataset}`,
projectId: w.projectId,
dataset: w.dataset
})), "key");
}
export {
uniqueProjectIdDataset
};
//# sourceMappingURL=uniqueProjectIdDataset.js.map