• Creates a tag from a string.

    Parameters

    • str: string

      String to convert

    • Optional options: {
          allowUpperCase: undefined | boolean;
          camelCase: undefined | boolean;
          replacement: undefined | string | Function;
      } = {}

      Additional options

      • allowUpperCase: undefined | boolean

        Do not forcibly lowercase everything.

      • camelCase: undefined | boolean

        Automatic camel case

      • replacement: undefined | string | Function

        Replacement for disallowed characters.

    Returns string

    • String suitable as a tag

    Example

    pf1.utils.createTag("Wizard of Oz 2"); // => "wizardOfOz2"
    pf1.utils.createTag("Wizard of Oz 2", {camelCase:false}); // => wizardofoz2
    pf1.utils.createTag("Wizard of Oz 2", {camelCase:false,allowUpperCase:true}); // => WizardofOz2
    pf1.utils.createTag("d'Artagnan"); // => dartagnan
    pf1.utils.createTag("d'Artagnan", {allowUpperCase:true}); // => dArtagnan

Generated using TypeDoc