Variable StringsConst

Strings: {
    comparator: {
        naturalAsc: ((a, b) => number);
        naturalDesc: ((a, b) => number);
        naturalValueAsc: (<T>(extractor) => ((a, b) => number));
        naturalValueDesc: (<T>(extractor) => ((a, b) => number));
    };
    helper: {
        camelCaseToSnakeCase: ((text) => string);
        camelize: ((value) => string);
        capitalize: ((string) => string);
        capitalizeEachWord: ((string) => string);
        equals: ((value1, value2?) => boolean);
        extractEmailDomain: ((email) => undefined | string);
        humanize: ((value) => string);
        isAlpha: ((value) => boolean);
        isBlank: ((value?) => boolean);
        isEmpty: ((value) => boolean);
        isNumeric: ((value) => boolean);
        isString: (<T>(data) => data is string);
        kebabCaseToCamelCase: ((text) => string);
        pad: ((value, nbOfCharacters, paddingCharacter?) => string);
        plainify: ((value) => string);
        snakeCaseToCamelCase: ((text) => string);
        valueOrEmpty: ((value?) => string);
    };
    parser: {
        parseBoolean: ((input?) => undefined | boolean);
    };
    regex: {
        alpha: RegExp;
        numeric: RegExp;
    };
    symbol: {
        COLON: string;
        COMMA: string;
        DOT: string;
        EMPTY: string;
        FORWARD_SLASH: string;
        HASHTAG: string;
        MINUS: string;
        PERCENTAGE: string;
        PLUS: string;
        QUESTION_MARK: string;
        SPACE: string;
        UNDERSCORE: string;
        UNIT_MASS: string;
        UNIT_NORMAL_METRIC: string;
        UNIT_WEIGHT: string;
        WILDCARD: string;
    };
} = ...

Type declaration

  • comparator: {
        naturalAsc: ((a, b) => number);
        naturalDesc: ((a, b) => number);
        naturalValueAsc: (<T>(extractor) => ((a, b) => number));
        naturalValueDesc: (<T>(extractor) => ((a, b) => number));
    }

    String comparators.

    • naturalAsc: ((a, b) => number)

      An ascendent natural string comparator.

        • (a, b): number
        • An ascendent natural string comparator.

          Parameters

          • a: string
          • b: string

          Returns number

    • naturalDesc: ((a, b) => number)

      An descendent natural string comparator.

        • (a, b): number
        • An descendent natural string comparator.

          Parameters

          • a: string
          • b: string

          Returns number

    • naturalValueAsc: (<T>(extractor) => ((a, b) => number))

      An ascendent natural string comparator from extracted values.

        • <T>(extractor): ((a, b) => number)
        • An ascendent natural string comparator from extracted values.

          Type Parameters

          • T

          Parameters

          Returns ((a, b) => number)

            • (a, b): number
            • Parameters

              Returns number

    • naturalValueDesc: (<T>(extractor) => ((a, b) => number))

      An descendent natural string comparator from extracted values.

        • <T>(extractor): ((a, b) => number)
        • An descendent natural string comparator from extracted values.

          Type Parameters

          • T

          Parameters

          Returns ((a, b) => number)

            • (a, b): number
            • Parameters

              Returns number

  • helper: {
        camelCaseToSnakeCase: ((text) => string);
        camelize: ((value) => string);
        capitalize: ((string) => string);
        capitalizeEachWord: ((string) => string);
        equals: ((value1, value2?) => boolean);
        extractEmailDomain: ((email) => undefined | string);
        humanize: ((value) => string);
        isAlpha: ((value) => boolean);
        isBlank: ((value?) => boolean);
        isEmpty: ((value) => boolean);
        isNumeric: ((value) => boolean);
        isString: (<T>(data) => data is string);
        kebabCaseToCamelCase: ((text) => string);
        pad: ((value, nbOfCharacters, paddingCharacter?) => string);
        plainify: ((value) => string);
        snakeCaseToCamelCase: ((text) => string);
        valueOrEmpty: ((value?) => string);
    }

    String helper methods.

    • camelCaseToSnakeCase: ((text) => string)

      Converts the given camel case formatted string into a snake case format.

      Param: text

      The string to convert.

      Returns

      the converted string result.

        • (text): string
        • Converts the given camel case formatted string into a snake case format.

          Parameters

          • text: string

            The string to convert.

          Returns string

          the converted string result.

    • camelize: ((value) => string)

      Camelize the given string.

      Param: value

      the string to camelize.

      Returns

      the formatted result.

        • (value): string
        • Camelize the given string.

          Parameters

          • value: string

            the string to camelize.

          Returns string

          the formatted result.

    • capitalize: ((string) => string)

      Capitalizes the first letter of the given string.

      Param: string

      the string to compute.

      Returns

      the result string.

        • (string): string
        • Capitalizes the first letter of the given string.

          Parameters

          • string: string

            the string to compute.

          Returns string

          the result string.

    • capitalizeEachWord: ((string) => string)

      Capitalizes the first letter of each word of the given string.

      Param: string

      the string to compute.

      Returns

      the result string.

        • (string): string
        • Capitalizes the first letter of each word of the given string.

          Parameters

          • string: string

            the string to compute.

          Returns string

          the result string.

    • equals: ((value1, value2?) => boolean)

      Test whether the two given string trimed value are equal.

      Param: value1

      The first value to compare.

      Param: value2

      The second value to compare.

      Returns

      true if the two values are equal once trimed, false otherwise.

        • (value1, value2?): boolean
        • Test whether the two given string trimed value are equal.

          Parameters

          • value1: string

            The first value to compare.

          • Optional value2: string

            The second value to compare.

          Returns boolean

          true if the two values are equal once trimed, false otherwise.

    • extractEmailDomain: ((email) => undefined | string)

      Extract the domain name from the given email address.

      Param: email

      The email address.

      Returns

      the corresponding domain name.

        • (email): undefined | string
        • Extract the domain name from the given email address.

          Parameters

          • email: string

            The email address.

          Returns undefined | string

          the corresponding domain name.

    • humanize: ((value) => string)

      Humanize the given string.

      Param: value

      the string to humanize.

      Returns

      the formatted result.

        • (value): string
        • Humanize the given string.

          Parameters

          • value: string

            the string to humanize.

          Returns string

          the formatted result.

    • isAlpha: ((value) => boolean)

      Tests whether the given string contains only alpha characters.

      Param: value

      The string to check.

      Returns

      true if the given string only contains alpha characters, false otherwise.

        • (value): boolean
        • Tests whether the given string contains only alpha characters.

          Parameters

          • value: string

            The string to check.

          Returns boolean

          true if the given string only contains alpha characters, false otherwise.

    • isBlank: ((value?) => boolean)

      Test whether the given string is either undefined, null or equal to an empty string.

      Param: value

      The string to test.

      Returns

      true if the given string is blank, false otherwise.

        • (value?): boolean
        • Test whether the given string is either undefined, null or equal to an empty string.

          Parameters

          • Optional value: null | string

            The string to test.

          Returns boolean

          true if the given string is blank, false otherwise.

    • isEmpty: ((value) => boolean)

      Test whether the given string is strictly equal to an empty string.

      Param: value

      The string to test.

      Returns

      true if the given string is empty, false otherwise.

        • (value): boolean
        • Test whether the given string is strictly equal to an empty string.

          Parameters

          • value: string

            The string to test.

          Returns boolean

          true if the given string is empty, false otherwise.

    • isNumeric: ((value) => boolean)

      Tests whether the given string contains only numeric characters.

      Param: value

      The string to check.

      Returns

      true if the given string only contains numeric characters, false otherwise.

        • (value): boolean
        • Tests whether the given string contains only numeric characters.

          Parameters

          • value: string

            The string to check.

          Returns boolean

          true if the given string only contains numeric characters, false otherwise.

    • isString: (<T>(data) => data is string)

      Tests whether the given data parameter is a string.

      Param: data

      The data to test.

      Returns

      true if the given data is a string, false otherwise.

        • <T>(data): data is string
        • Tests whether the given data parameter is a string.

          Type Parameters

          • T

          Parameters

          • data: string | T

            The data to test.

          Returns data is string

          true if the given data is a string, false otherwise.

    • kebabCaseToCamelCase: ((text) => string)

      Converts the given kebab case formatted string into a camel case format.

      Param: text

      The string to convert.

      Returns

      the converted string result.

        • (text): string
        • Converts the given kebab case formatted string into a camel case format.

          Parameters

          • text: string

            The string to convert.

          Returns string

          the converted string result.

    • pad: ((value, nbOfCharacters, paddingCharacter?) => string)

      Formats the given string value to contain at least the given number of characters, adding the given padding character at the end of the value if needed.

      Param: value

      the value to format.

      Param: nbOfCharacters

      The desired minimum number of characters.

      Param: paddingCharacter

      The padding character.

      Returns

      the formatted result.

        • (value, nbOfCharacters, paddingCharacter?): string
        • Formats the given string value to contain at least the given number of characters, adding the given padding character at the end of the value if needed.

          Parameters

          • value: string

            the value to format.

          • nbOfCharacters: number

            The desired minimum number of characters.

          • paddingCharacter: string = EMPTY

            The padding character.

          Returns string

          the formatted result.

    • plainify: ((value) => string)

      Plainify the given string, converting every special character into its plain brother.

      Param: value

      The string to convert.

      Returns

      a plainified string.

        • (value): string
        • Plainify the given string, converting every special character into its plain brother.

          Parameters

          • value: string

            The string to convert.

          Returns string

          a plainified string.

    • snakeCaseToCamelCase: ((text) => string)

      Converts the given snake case formatted string into a camel case format.

      Param: text

      The string to convert.

      Returns

      the converted string result.

        • (text): string
        • Converts the given snake case formatted string into a camel case format.

          Parameters

          • text: string

            The string to convert.

          Returns string

          the converted string result.

    • valueOrEmpty: ((value?) => string)

      Converted any given blank values to an empty string (""). If the given value contains a string, the method will return it unarmed.

      Param: value

      The value to convert.

      Returns

      the exact given string if not blank, an empty string otherwise.

        • (value?): string
        • Converted any given blank values to an empty string (""). If the given value contains a string, the method will return it unarmed.

          Parameters

          • Optional value: string | false

            The value to convert.

          Returns string

          the exact given string if not blank, an empty string otherwise.

  • parser: {
        parseBoolean: ((input?) => undefined | boolean);
    }

    String parsers.

    • parseBoolean: ((input?) => undefined | boolean)

      Extract a boolean value from the given string.

      Param: input

      The boolean-string to parse.

      Returns

      the boolean value corresponding to the given string. If the given input is null, this methid resturns undefined.

        • (input?): undefined | boolean
        • Extract a boolean value from the given string.

          Parameters

          • Optional input: null | string

            The boolean-string to parse.

          Returns undefined | boolean

          the boolean value corresponding to the given string. If the given input is null, this methid resturns undefined.

  • regex: {
        alpha: RegExp;
        numeric: RegExp;
    }

    String regexs.

    • alpha: RegExp

      Regex pattern that matches string containing only alpha characters.

    • numeric: RegExp

      Regex pattern that matches string containing only numeric characters.

  • symbol: {
        COLON: string;
        COMMA: string;
        DOT: string;
        EMPTY: string;
        FORWARD_SLASH: string;
        HASHTAG: string;
        MINUS: string;
        PERCENTAGE: string;
        PLUS: string;
        QUESTION_MARK: string;
        SPACE: string;
        UNDERSCORE: string;
        UNIT_MASS: string;
        UNIT_NORMAL_METRIC: string;
        UNIT_WEIGHT: string;
        WILDCARD: string;
    }

    String symbols.

    • COLON: string
    • COMMA: string
    • DOT: string
    • EMPTY: string
    • FORWARD_SLASH: string
    • HASHTAG: string
    • MINUS: string
    • PERCENTAGE: string
    • PLUS: string
    • QUESTION_MARK: string
    • SPACE: string
    • UNDERSCORE: string
    • UNIT_MASS: string
    • UNIT_NORMAL_METRIC: string
    • UNIT_WEIGHT: string
    • WILDCARD: string

Generated using TypeDoc