@rtorcato/supabase-common / unwrapArray
Function: unwrapArray()
unwrapArray<
T>(result):T[]
Defined in: unwrap.ts:73
Unwrap a list query: throw on error, otherwise return the rows — coercing a
null payload to [] so callers can always .map()/.length the result.
const rows = unwrapArray(await supabase.from('users').select())
Type Parameters
T
T
Parameters
result
PostgrestLike<T[]>
Returns
T[]