From f68b028d7622826326bcfc232f4eb6a686685c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Og=C3=B3rek?= Date: Tue, 23 Jan 2024 17:06:13 +0100 Subject: [PATCH] docs: Add Deno how-to to README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01ae22b1..5ef1dead 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key ### UMD -You can now use plain ` @@ -48,7 +48,7 @@ Then you can use it from a global `supabase` variable: ### ESM -You can now use type="module" ` ``` + +### Deno + +You can use supabase-js in the Deno runtime via esm.sh: + +```js +import { createClient } from 'https://esm.sh/@supabase/supabase-js@2' +``` + ### Custom `fetch` implementation `supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers: