Skip to content

classes

Generates a list of class names based on a given condition or directly returns class names.

Usage

ts
import { classes } from 'rattail'

classes('a', [true, 'b', 'c'])
// return ['a', 'b']
classes('a', [false, 'b', 'c'])
// return ['a', 'c']

Arguments

ArgTypeDefaults
...argsstring | Array

Return

Type
any[]