aboutsummaryrefslogtreecommitdiff
path: root/node_modules/glob-parent/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/glob-parent/README.md')
-rw-r--r--node_modules/glob-parent/README.md22
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