diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
commit | d1291f67551c58168af43698a359cb5ddfd266b0 (patch) | |
tree | 55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/glob-parent/README.md | |
parent | d0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff) |
node_modules
Diffstat (limited to 'node_modules/glob-parent/README.md')
-rw-r--r-- | node_modules/glob-parent/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md index ff5310d3b..243ff9ccf 100644 --- a/node_modules/glob-parent/README.md +++ b/node_modules/glob-parent/README.md @@ -11,6 +11,8 @@ Usage npm install glob-parent --save ``` +**Examples** + ```js var globParent = require('glob-parent'); @@ -31,7 +33,27 @@ globParent('path/**/*'); // 'path' globParent('path/foo/bar.js'); // 'path/foo' globParent('path/foo/'); // 'path/foo' globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: +- `?` (question mark) +- `*` (star) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/') // 'foo' +globParent('foo/\\[bar]/') // 'foo/[bar]' ``` Change Log |