@squidcloud/client
    Preparing search index...

    Function generateShortId

    • Generates an ID of the given length using lowercase latin letters and digits. If the 'prefix' provided replaces the first generated characters with the prefix. If the 'prefixToAvoid' provided, ensures the generated ID does not start with this prefix. When both 'prefix' and 'prefixToAvoid' are provided, 'prefixToAvoid' must be longer than 'prefix'.

      Parameters

      • length: number = DEFAULT_SHORT_ID_LENGTH
      • prefix: string = ''
      • prefixToAvoid: string = ''

      Returns string