mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-08 16:33:05 +00:00
7 lines
252 B
TypeScript
7 lines
252 B
TypeScript
|
|
type Attributes = Record<string, string | boolean>;
|
||
|
|
|
||
|
|
export const attributes = (attributes: Attributes) =>
|
||
|
|
Object.keys(attributes)
|
||
|
|
.filter((key) => attributes[key] !== false)
|
||
|
|
.reduce((prev, key) => ({ ...prev, [key]: attributes[key] }), {});
|