@webext-core/match-patterns
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@webext-core/match-patterns

Utilities for working with match patterns.

pnpm i @webext-core/match-patterns
import { MatchPattern } from '@webext-core/match-patterns';

const pattern = MatchPattern('*://*.google.com/*');

pattern.includes('http://google.com/search?q=test'); // true
pattern.includes('https://accounts.google.com'); // true
pattern.includes('https://youtube.com/watch'); // false

Get Started

See documentation to get started!

Supported Protocols

Not all protocols are supported. Open a PR to add support.

  • [x] <all_urls>
  • [x] https protocol
  • [x] http protocol
  • [ ] file protocol
  • [ ] ftp protocol
  • [ ] urn protocol

/@webext-core/match-patterns/

    Package Sidebar

    Install

    npm i @webext-core/match-patterns

    Weekly Downloads

    5,777

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    17.7 kB

    Total Files

    7

    Last publish

    Collaborators

    • _aklinker1