Skip to content

AngelMunoz/fable-urlpattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fable.URLPattern

This are the bindings for the URLPattern APi

if you're using this package in the browser/bun you might need a polyfill

which can be installed via npm install urlpattern-polyfill after thad don't forget to define a compiler directive in your F# project to enable the polyfill usage. Example:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <Version>1.0.0-beta-001</Version>
    <!-- This line below -->
    <DefineConstants>$(DefineConstants);ENABLE_URLPATTERN_POLYFILL</DefineConstants>
  </PropertyGroup>
    <!-- the rest of the *.fsproj file -->
</Project>

if your environment (e.g. deno/chromium browsers) already provide URLPattern then there's no need to install the polyfill or enable the compiler directive