• converts a string into a slug

    Parameters

    • str: string
    • Optionaloptions: {
          deduplicate?: boolean;
          lower?: boolean;
          replace?: string;
          trim?: boolean;
      }
      • Optionaldeduplicate?: boolean

        deduplicate successives replace char (default=true)

      • Optionallower?: boolean

        convert the string to lowercase (default=true).

      • Optionalreplace?: string

        the string to replace non-alphanumeric characters with (default='-').

      • Optionaltrim?: boolean

        trim leading/trailing whitespace (default=true).

    Returns string