@webdeveric/utils
    Preparing search index...

    Function codePointLength

    • Get the number of Unicode code points in input, unlike string.length which counts UTF-16 code units.

      Parameters

      • input: string

      Returns number

      codePointLength('hello'); // 5
      codePointLength('😀'); // 1
      '😀'.length; // 2