Package Exports
- glob-intersection
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (glob-intersection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
glob-intersection
Find the intersection of two glob patterns
intersect = require("glob-intersection")
intersect("**/*.{js,coffee}", "/hello/world/*.??")
# => "/hello/world/*.js"
intersect("hello", "world")
# => false
intersect("{a,b,c,x,d}", "{x,y,z,c,w}")
# => "{c,x}"
intersect("*a*b*", "*x*y*")
# => "*{a*{b*x*y,x*{b*y,y*b}},x*{a*{b*y,y*b},y*a*b}}*"
# braces(_) => '["*a*b*x*y*","*x*a*b*y*","*a*x*b*y*","*x*y*a*b*","*x*a*y*b*","*a*x*y*b*"]'Caveats
Full compatability with Bash or other globbing libraries was not a design goal. In a lot of ways this library is more permissive. For example, * will match dotfiles and ** will simply match any character, so a pattern like **cd will intersect with /abcd while the glob match itself would fail.
Please see the tests for more examples.
Supported glob features:
*matches any number of non/character**matches any number of characters?maches exactly one non/character{a,b}matches eitheraorband brackets can be nested
Any and all issue reports are appreciated!