Skip to main content

pathcat makes URLs easy

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
6 months ago (1.4.0)
type alias DropProtocol

Drops the protocol from the start of a url string

Type Parameters

T extends string

Definition

T extends `${infer _Protocol extends "http" | "https"}://${infer Rest}` ? Rest : T

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@alistair/pathcat

Import symbol

import { type DropProtocol } from "@alistair/pathcat";

---- OR ----

Import directly with a jsr specifier

import { type DropProtocol } from "jsr:@alistair/pathcat";

Add Package

npx jsr add @alistair/pathcat

Import symbol

import { type DropProtocol } from "@alistair/pathcat";

Add Package

yarn dlx jsr add @alistair/pathcat

Import symbol

import { type DropProtocol } from "@alistair/pathcat";

Add Package

pnpm dlx jsr add @alistair/pathcat

Import symbol

import { type DropProtocol } from "@alistair/pathcat";

Add Package

bunx jsr add @alistair/pathcat

Import symbol

import { type DropProtocol } from "@alistair/pathcat";