@yesstudio/yes-utils
    Preparing search index...

    Function toWords

    • Converts string into an array of its words.

      Type Parameters

      • T extends string[]

      Parameters

      • string: string

        The string to convert.

      Returns T

      Returns the words array.

      toWords('Hello, world!')
      // => ['Hello', 'world']