silverwolf-x's picture
download
raw
387 Bytes
export function formatVariant(
scenario: string,
props: Record<string, string | number | boolean | null>
): string {
const keys = Object.keys(props)
.filter((key) => props[key] !== false && props[key] !== null)
.map((key) => (props[key] === true ? key : `${key}=${props[key]}`))
if (keys.length === 0) {
return scenario
}
return `${scenario} ${keys.join(' ')}`
}

Xet Storage Details

Size:
387 Bytes
·
Xet hash:
186980bcdf81a9351188f32f088b8872f9245f7f5be4c4fddae28183931b37d9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.