Hierarchy

  • StringUtils

Constructors

Methods

  • Parameters

    • value: string

      The value to test

    • acceptedChars: string

      The first character must match one of these

    Returns boolean

  • Stringify a number

    Parameters

    • x: number
    • thousandSeparator: string = ' '
    • digitSeparator: string = '.'

    Returns string

  • Parameters

    • value: string

      The value to test

    • acceptedChars: string

      Every character must match one of these

    Returns boolean

  • Fixme

    This probably should be inside Pipeline code, not here, and configurable in processVariablesInString().

    Parameters

    • variableKey: string

    Returns boolean

  • Convert any found variables in the input to corresponding values.

    The variable keyword may be a path to a variable inner in the variables structure. Eg. when variables is {"foo":{"bar":123}}, the inner value 123 can be referenced using {variablePrefix}foo.bar{variableSuffix} in the input.

    The input may be any JSON structure. Only string items will be processed. That means keywords and scalar string values inside the structure.

    Returned structure is a partial (copy on write) version of the input structure.

    Parameters

    Returns ReadonlyJsonAny

  • Convert any found variables in the input to corresponding values.

    The variable keyword may be a path to a variable inner in the variables structure. Eg. when variables is {"foo":{"bar":123}}, the inner value 123 can be referenced using {variablePrefix}foo.bar{variableSuffix} in the input.

    Returns the string with any found variables converted.

    Parameters

    Returns ReadonlyJsonAny

  • Parameters

    • value: string

      The value to test

    • acceptedChars: string

      The first character must match one of these

    Returns boolean

  • Converts arguments as a string.

    This is a helper function to make sure every value's string presentation is actually used.

    JavaScript uses .valueOf() in many instances instead of .toString().

    See also https://stackoverflow.com/a/2485794/901430

    Parameters

    • Rest ...values: any[]

    Returns string

  • Parameters

    • value: string

      The value to test

    • acceptedStartChars: string = undefined

      If defined, the first character must match one of these.

    • acceptedMiddleChars: string = acceptedStartChars

      If defined, every character must match this. Defaults to acceptedStartChars.

    • acceptedEndChars: string = acceptedMiddleChars

      If defined, every character must match this. Defaults to acceptedMiddleChars.

    • minLength: number = 0

      The minimum length of the string. Defaults to 0.

    • maxLength: number = undefined

      The maximum length of the string. Defaults to no limit.

    Returns boolean

Generated using TypeDoc