isBemChildKey

Theme
stable

Returns true when a token path segment is a BEM child key — a single word containing only letters, with no hyphens or digits. Used by the token-name resolver to emit __child vs ---property separators.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

key
required
string
A single segment from a token path, e.g. "overlay", "background-color", "500". Only bare alpha words pass the guard.

API

Return value

The value returned by this util.

true for strings that match /^[a-zA-Z]+$/ and contain no hyphen; false for any string with a hyphen, digit, or other character.

Usage

Examples

Ready-to-paste usage snippets.

Detect BEM child segments

typescript