sindresorhus / multimatch

Extends minimatch.match() with support for multiple patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"@" character not matching

elmpp opened this issue · comments

I would be expecting to see some matches here:

import multimatch from 'multimatch';

const matches1 = multimatch([
  'monotonous-root',
  '@monotonous/core',
  'monotonous',
  'penrice-scripts',
  'penrice-typescript-aliases'
], ["@monotonous.*"]);

const matches2 = multimatch([
  'monotonous-root',
  '@monotonous/core',
  'monotonous',
  'penrice-scripts',
  'penrice-typescript-aliases'
], [".monotonous.*"]);

Both matches1|2 yield empty results. Directly using minimatch yields a match...

The pattern should be a glob pattern, not a regex.

The pattern @monotonous.* should be changed to @monotonous/*.

oooopsie daisy