Skip to content

Rename API method matchDomains to matchHostnames #73

Description

@exalted

Hi,

My :two-cents: here: I think finicky.matchDomains is a misleading name choice for an API that would actually match the entire hostname instead.

I am telling this, because I was trying the simplest configuration:

module.exports = {
  defaultBrowser: 'Safari',
  handlers: [
    {
      match: finicky.matchDomains([ 'example.com' ]),
      browser: 'Firefox'
    }
  ]
};

But it kept failing to open http://www.example.com/ with Firefox. I realized it wasn't matching the URL because of the www (subdomain) in the hostname.

Anyway changing matcher to finicky.matchDomains([ /(.+\.)?example.com/ ]) did the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions