File: .verb.md

package info (click to toggle)
node-is-negated-glob 1.0.0%2B~1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 128 kB
  • sloc: javascript: 73; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## Usage

```js
var isNegatedGlob = require('{%= name %}');

console.log(isNegatedGlob('foo'));
// { pattern: 'foo', negated: false }

console.log(isNegatedGlob('!foo'));
// { pattern: 'foo', negated: true }

console.log(isNegatedGlob('!(foo)'));
// extglob patterns are ignored
// { pattern: '!(foo)', negated: false }
```