@playlive/tiltify-core
    Preparing search index...

    Function extractSlugsFromTiltifyUrl

    • Extracts fundraiser + campaign slugs from a Tiltify URL.

      Accepts both absolute and relative URLs (see module-level docs). Returns null if the URL doesn't match the @user/campaign or +team/campaign shape, or if the URL is malformed.

      Parameters

      • url: string

      Returns ExtractedSlugs | null

      extractSlugsFromTiltifyUrl("https://tiltify.com/@alice/spring");
      // { fundraiserType: "user", fundraiserSlug: "alice", campaignSlug: "spring" }

      extractSlugsFromTiltifyUrl("/@alice/spring");
      // { fundraiserType: "user", fundraiserSlug: "alice", campaignSlug: "spring" }

      extractSlugsFromTiltifyUrl("https://tiltify.com/+team-foo/bar");
      // { fundraiserType: "team", fundraiserSlug: "team-foo", campaignSlug: "bar" }

      extractSlugsFromTiltifyUrl("not-a-url"); // null