Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

Url Matcher

A simple library to match url domains.

Usage

import { urlMatcher } from 'url-matcher';

function matchExample() {
    const toMatch = 'www.fetcher.ai';
    const domain = 'fetcher.ai';

    if (urlMatcher(domain, toMatch)) {
        // do things...
    }
}

API

urlMatcher(domainA: string, domainB: string): boolean

Return: Boolean depending on the result is true or false.

Params

Field Name Type Default Description
domainA string mandatory Mandatory domain A to match
domainB string mandatory Mandatory domain B to match with A

Tests

To execute jest tests:

pnpm test

Maintain

This package use TSdx. Please check documentation to update this package.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages