Core - v1.0.0
    Preparing search index...

    Class Text

    String helpers used by the framework layer.

    Pure functions: no bindings, no configuration, no Env. That is what makes them safe to call from anywhere in core/ — including from resolve's callers, where reaching for anything stateful would reintroduce the cycle the configuration layer avoids.

    Text.truncate('a-very-long-sampling-key', 96)
    Text.trim(input.title) // '' for null, undefined, or whitespace
    Text.isBlank(input.body)

    Bayu Dwiyan Satria

    1.0.0

    1.0.0

    Index
    • Reports whether a value is missing or contains only whitespace.

      Parameters

      • Optionalvalue: string

        The value to test.

      Returns boolean

      true when there is nothing meaningful in it.

    • Trims a value that may not be there.

      Parameters

      • Optionalvalue: string

        The value to trim.

      Returns string

      The trimmed value, or an empty string when it was absent.

    • Shortens a value to a maximum length.

      Parameters

      • value: string

        The value to shorten.

      • max: number

        Maximum number of characters to keep.

      Returns string

      The value, cut to max characters.

      Telemetry backends commonly cap an index or dimension by length and reject an oversized write outright rather than truncating it for you.