Skip to content

unbem

const unbem: (passedClasses, options?) => BEMObject[] = _unbem

Defined in: index.js:8

Parse a list of BEM class names into deduplicated BEM objects.

Classes are sorted links-first (block__element forms before bare block/block--modifier forms) and then merged in a single pass. Sorting makes the result independent of the input order — every element→block link is established before any standalone modifier class is folded in — so the same set of classes always yields the same objects.

string | string[]

string = ''

BEMSyntax

BEMObject[]