JSPM

@webext-core/match-patterns

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30912
  • Score
    100M100P100Q166436F
  • License MIT

Utilities for working with match patterns.

Package Exports

  • @webext-core/match-patterns

Readme

@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.

  • <all_urls>
  • https protocol
  • http protocol
  • file protocol
  • ftp protocol
  • urn protocol