Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-02-20 19:16:42 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-02-20 19:16:42 +0300
commit0fe0caa7eddb7acdacbe5ee81ceabaca27175c78 (patch)
tree0ef2efcd11cb37fef5fa9ba7af8a56f00092b00e /node_modules/glob/sync.js
parentaa791942a9f3c8af6a650edec72a675deb7a7c6e (diff)
glob@4.4.0
Adds ignoring matches.
Diffstat (limited to 'node_modules/glob/sync.js')
-rw-r--r--node_modules/glob/sync.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js
index f981055af..686f2c369 100644
--- a/node_modules/glob/sync.js
+++ b/node_modules/glob/sync.js
@@ -14,6 +14,7 @@ var alphasorti = common.alphasorti
var isAbsolute = common.isAbsolute
var setopts = common.setopts
var ownProp = common.ownProp
+var childrenIgnored = common.childrenIgnored
function globSync (pattern, options) {
if (typeof options === 'function' || arguments.length === 3)
@@ -98,6 +99,10 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
var abs = this._makeAbs(read)
+ //if ignored, skip processing
+ if (childrenIgnored(this, read))
+ return
+
var isGlobStar = remain[0] === minimatch.GLOBSTAR
if (isGlobStar)
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
@@ -105,6 +110,7 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
}
+
GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
var entries = this._readdir(abs, inGlobStar)