diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/anymatch/README.md | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) | |
download | wallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz |
node_modules
Diffstat (limited to 'node_modules/anymatch/README.md')
-rw-r--r-- | node_modules/anymatch/README.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/node_modules/anymatch/README.md b/node_modules/anymatch/README.md index 0a6329213..62f65da87 100644 --- a/node_modules/anymatch/README.md +++ b/node_modules/anymatch/README.md @@ -38,7 +38,7 @@ var anymatch = require('anymatch'); var matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', - /foo.js$/, + /foo\.js$/, function (string) { return string.indexOf('bar') !== -1 && string.length > 10 } @@ -58,6 +58,13 @@ anymatch(matchers, 'path/anyjs/foo.js', true); // 1 anymatch(matchers, 'path/to/file.js', false, 1); // false anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true ``` #### anymatch (matchers) |