@pengzhanbo/utils - v3.7.3
    Preparing search index...

    Function isJSONArray

    • Checks if a given value is a valid JSON array.

      检查给定值是否为有效的 JSON 数组。

      Parameters

      • value: unknown

        The value to check. 要检查的值

      Returns value is any[]

      True if the value is a valid JSON array, false otherwise. 如果值是有效的 JSON 数组则返回 true,否则返回 false

      This function recursively validates each element using isJSONValue. For deeply nested arrays, this can result in a large call stack and may hit the stack size limit of the runtime.

      该函数使用 isJSONValue 递归验证每个元素。对于深度嵌套的数组, 这可能导致较大的调用栈,并可能达到运行时的栈大小限制。

      isJSONArray([1, 2, 3]) // => true
      isJSONArray([() => {}]) // => false