Change8

@cloudflare/workers-utils@0.30.0

📦 cloudflare-workersView on GitHub →
2 features🔧 2 symbols

Summary

Introduced `toUrlPath` and `UrlPath` to facilitate the conversion of file-system paths into URL-safe paths. `UrlPath` provides type-level assurance for URL normalization.

✨ New Features

  • Add `toUrlPath` function which converts a file-system path into a URL-safe path by replacing backslashes with forward slashes and rejecting Windows drive-letter prefixes (e.g. `C:`).
  • Add `UrlPath` branded string type which proves at the type level that a string has been normalized for use in URLs.

Affected Symbols