supabase-common
Small, focused helpers for working with Supabase and PostgREST results — part
of the @rtorcato/* family.
- Zero runtime dependencies — helpers operate on the plain
{ data, error }shape every Supabase call returns, so the package works with any@supabase/supabase-jsversion without depending on it. - ESM-only, tree-shakeable —
sideEffects: false, fully typed, targets Node.js ≥22. - Just the ergonomics — stop writing
if (error) throw erroron every call.
Early days
The public API is still small and may change before 1.0. See the
milestones for what's
planned.
Quick example
import { unwrap } from '@rtorcato/supabase-common'
// Throws SupabaseError on error, returns the row otherwise.
const user = unwrap(await supabase.from('users').select().eq('id', id).single())
Next: install it and read the usage guide.