JSPM

@edgarbarrantes/supabase-fetcher-helpers

0.1.16
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q68513F
  • License ISC

Fetcher and helpers for supabase

Package Exports

  • @edgarbarrantes/supabase-fetcher-helpers

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@edgarbarrantes/supabase-fetcher-helpers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Supabase fetcher helpers

Includes a fetcher function and helpers.

const apiKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY // Or however you store you're key.
const fetcher = getFetcher(apiKey)

const token = session.access_token // User's access token.
const apiUrl = process.env.NEXT_PUBLIC_SUPABASE_URL // https://something.supabase.co
const table = 'consumers'
const { select, filterString, rangeString } = getOptions(fields, filters, range)

const data = await fetcher(
  token,
  apiUrl,
  table,
  select,
  filterString,
  rangeString,
)