@nightgrey/ansi
    Preparing search index...

    Function graphemes

    • Splits a string into grapheme clusters

      Parameters

      • string: string

      Returns Generator<string, void, unknown>

      import { graphemes } from './graphemes';

      for (const grapheme of graphemes('👋 Hello World')) {
      console.log(grapheme);
      }

      // Output:
      // 👋
      // Hello
      // World