Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 315 Bytes
8f2b05f |
1 2 3 4 5 |
// compute a "collection key" that we can use in our useEffects and such
export function getCollectionKey(input?: any): string {
const collection: any[] = Array.isArray(input) ? input : [`${input || ""}`]
return (collection || []).map((v: any) => (v as any)?.id || JSON.stringify(v)).filter(x => x).join("--")
} |