Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not returning booleans as documented #9

Open
stevenvachon opened this issue Aug 17, 2015 · 2 comments
Open

Not returning booleans as documented #9

stevenvachon opened this issue Aug 17, 2015 · 2 comments

Comments

@stevenvachon
Copy link

console.log( require("wildcard")("a.b.*", "a.b.c") );  //-> ["a","b","c"]
@revelt
Copy link

revelt commented Apr 23, 2017

Confirmed, there are fishy things happening when source string somewhat resembles the object notation:

var wildcard = require("wildcard")
var res = wildcard('foo.*', 'foo')
console.log(typeof res)
// => "object"

see this example on Runkit

This behaviour doesn't make sense to me too.

@revelt
Copy link

revelt commented Apr 23, 2017

For posterity, I switched to matcher, it does the string wildcard comparisons and does not have any problems with output types or leading wildcards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants