Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dynablox_opencloud/src/shims/urlpattern/path-to-regex-modified.ts>pathToRegexp

A Roblox OpenCloud API wrapper for Deno and NodeJS written in TypeScript.
Latest
function pathToRegexp
import { pathToRegexp } from "https://deno.land/x/dynablox_opencloud@v0.2.2/src/shims/urlpattern/path-to-regex-modified.ts";

Normalize the given path string, returning a regular expression.

An empty array can be passed in for the keys, which will hold the placeholder key descriptions. For example, using /user/:id, keys will contain [{ name: 'id', delimiter: '/', optional: false, repeat: false }].

Parameters

path: Path
optional
keys: Key[]