kit
    Preparing search index...

    Function encode

    • Encode a string into digits, a light obfuscation (not an encryption) that decode reverses.

      Each character becomes its 3 digits char code (a -> 097), line breaks included. Characters with a code point of 1000 or more (€, CJK, emoji…) become u followed by 7 digits, which keeps the output of the most common characters identical to previous versions.

      Type Parameters

      • TReturn extends string

      Parameters

      • str: string

      Returns TReturn