Skip to content

Theemo / @theemo/figma / getNameFromStyle

Function: getNameFromStyle()

ts
function getNameFromStyle(style): string

Default implementation for getNameFromStyle()

Does the following things:

  • replaces / with .
  • removes a . when it is a prefix
  • turns string into lower case

Parameters

ParameterTypeDescription
styleStyleFigma Style

Returns

string

normalized name

See

Documentation

Source

packages/@theemo/figma/src/defaults.ts:63