Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
dawaltconley authored and github-actions[bot] committed May 23, 2024
1 parent 20ff39e commit ea19e7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/transformers/cloudflare_images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { toUrl } from "../utils.ts";
const cloudflareImagesRegex =
/https?:\/\/(?<host>[^\/]+)\/cdn-cgi\/imagedelivery\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g;
const imagedeliveryRegex =
/https?:\/\/(?<host>imagedelivery.net)\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g
/https?:\/\/(?<host>imagedelivery.net)\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g;

const parseTransforms = (transformations: string) =>
Object.fromEntries(
Expand All @@ -30,10 +30,9 @@ const formatUrl = (
.join(",");

const pathSegments = [
...(host === 'imagedelivery.net'
...(host === "imagedelivery.net"
? [host]
: [host, "cdn-cgi", "imagedelivery"]
),
: [host, "cdn-cgi", "imagedelivery"]),
accountHash,
imageId,
transformString,
Expand Down

0 comments on commit ea19e7e

Please sign in to comment.