From aa6f288edf8450f1437341c6800f7277ec26f2bd Mon Sep 17 00:00:00 2001 From: Matthew Herod Date: Sat, 4 Jan 2025 18:44:02 +0000 Subject: [PATCH] fix: update examples to use correct cookie name and add execution code --- examples/advanced-usage.ts | 9 +++++++-- examples/basic-usage.ts | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/advanced-usage.ts b/examples/advanced-usage.ts index 71ed307..2e8e198 100644 --- a/examples/advanced-usage.ts +++ b/examples/advanced-usage.ts @@ -40,7 +40,7 @@ export async function browserSpecificExamples(): Promise { // Get a cookie by name and domain const cookie = await getCookieFn({ - name: "session", + name: "user_session", domain: "github.com", }); @@ -59,9 +59,14 @@ export async function urlBasedExamples(): Promise { // Get a cookie by name and domain const cookie = await getCookieFn({ - name: "session", + name: "user_session", domain: "github.com", }); console.log("Cookie:", cookie); } + +// Execute the examples +Promise.all([browserSpecificExamples(), urlBasedExamples()]).catch( + console.error, +); diff --git a/examples/basic-usage.ts b/examples/basic-usage.ts index 2ed5961..2fe6f7f 100644 --- a/examples/basic-usage.ts +++ b/examples/basic-usage.ts @@ -39,9 +39,12 @@ export async function runBasicExamples(): Promise { // Get a cookie by name and domain const cookie = await getCookieFn({ - name: "session", + name: "user_session", domain: "github.com", }); console.log("Cookie:", cookie); } + +// Execute the examples +runBasicExamples().catch(console.error);