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

Issue with micromatch.every #208

Open
a7ul opened this issue Jul 29, 2020 · 1 comment
Open

Issue with micromatch.every #208

a7ul opened this issue Jul 29, 2020 · 1 comment

Comments

@a7ul
Copy link

a7ul commented Jul 29, 2020

(Thanks for reporting an issue to micromatch! If you haven't already read the contributor guidelines, Please do that now, then proceed to fill out the details below.)

Please describe the minimum necessary steps to reproduce this issue:

const micromatch = require("micromatch")

const userPermissions = [
    'application:*',
    'customer:*',
];
      
console.log(
    micromatch.every(
        ['customer:read:self'], 
        userPermissions
    )
);

The documentation says: Returns true if every string in the given list matches any of the given glob patterns.

So, shouldnt this return true ? but instead it returns false.

Or have I got this completely wrong 😅 ?

@a7ul
Copy link
Author

a7ul commented Jul 29, 2020

Update: This works correctly with nanomatch though. I just swapped micromatch with nanomatch and everything works as expected.

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

1 participant