@tremendous/help
    Preparing search index...

    Function flattenToStrings

    • Recursively extracts all string values from a nested object structure. Useful for handling error payloads that can be deeply nested.

      Parameters

      • value: unknown

      Returns string[]

      flattenToStrings({ a: "hello", b: { c: "world" } }) // ["hello", "world"]
      flattenToStrings(["a", ["b", "c"]]) // ["a", "b", "c"]
      flattenToStrings("hello") // ["hello"]