extractCssClassesNames

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.html

This function allows you to extract all the classes names from a passed html string. You can use it with other things than html but depending on the complexity of your string, it may not work as expected…

Params

  1. html*-String

    The HTML to process.

Return

  1. -String[]

    The finded css classes names

Example

import { extractCssClassesNames } from '@blackbyte/sugar/html';
extractCssClassesNames('...');

Settings

  1. expandPleasantCssClassnametrueBoolean

    Specify if you want to expand the pleasant css classes names like “s-typo:p” to “s-typo—p”