@rotomeca/utils - v7.0.3
    Preparing search index...

    Function words

    • Découpe une chaîne en mots en gérant intelligemment camelCase, PascalCase, snake_case, kebab-case et les espaces.

      Délègue la normalisation à toSnakeCase puis découpe sur _.

      Parameters

      • str: string

        La chaîne à découper.

      Returns string[]

      Un tableau de mots en minuscules.

      words("helloWorld")         // → ["hello", "world"]
      words("Bonjour Le Monde") // → ["bonjour", "le", "monde"]
      words("foo-bar") // → ["foo", "bar"]
      words("foo_bar") // → ["foo", "bar"]
      words("__foo__bar__") // → ["foo", "bar"]
      words("") // → []