is-glob icon indicating copy to clipboard operation
is-glob copied to clipboard

`isGlob('?')` returns false

Open tgrajewski opened this issue 3 years ago • 2 comments

I've noticed that isGlob() returns false when called with simple patterns with only question mark in them. Is this intended?

isGlob('*');  // true
isGlob('?');  // false
isGlob('audio/?.m4a');  // false again

tgrajewski avatar Apr 08 '21 11:04 tgrajewski

I get the following:

console.log(isGlob('*')) // true
console.log(isGlob('?', { strict: false })) // false
console.log(isGlob('audio/?.m4a', { strict: false })) // false

jonschlinkert avatar Apr 08 '21 11:04 jonschlinkert

Hello, I am trying to match

abc/a.ts
abc/b.ts
abc/c.ts

so I wrote

isGlob('abc/?.ts') // false

But isGlob('abc/?.ts') should return true.. Right?

https://en.wikipedia.org/wiki/Glob_(programming) The other common wildcard is the question mark (?), which stands for one character.

I had to do { strict: false } which makes me uneasy..

WORMSS avatar Aug 19 '22 11:08 WORMSS