domain-matcher
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Domain matcher

Build Status npm npm type definitions

Check if given domain/url matches against domain patterns.

Features

  • Only ~3 kB (~1.2 kB gzipped).
  • Suitable for browser environments.
  • No additional dependencies.

Install

With NPM:

$ npm install domain-matcher

With Yarn:

$ yarn add domain-matcher

Usage

import { match } from 'domain-matcher'
 
match('domain.matcher.com', '*.matcher.com') // => true
match('matcher.com', '*.matcher.com') // => false
match('matcher.com', '*.matcher.com', '*.com') // => false (Because '*.com' matches)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i domain-matcher

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

17.9 kB

Total Files

22

Last publish

Collaborators

  • wipeair