Performs a fast pre-validation safety check for HexaURL encoding to prevent errors and conflicts.

Efficiently validates only string length constraints and ASCII character restriction, skipping full validation.

Optimized for rapid pre-screening before search operations or other cases where generating an invalid HexaURL temporarily is acceptable. The lighter validation makes it ideal for high-performance lookup scenarios where a full validation pass is not required.


  • Parameters

    • input: string

      The string to check

    • byteSize: number = 16

      The target byte array size after encoding (default 16)

    Returns boolean

    boolean indicating if the string is safe to encode