Comparing version 0.8.7 to 0.8.8
@@ -15,17 +15,22 @@ var assert = require("assert"); | ||
var grepExtensionDef = Q.defer(); | ||
var grepExtensionP = grepExtensionDef.promise; | ||
run("grep", [ | ||
"--quiet", | ||
"--perl-regexp", | ||
"spawn", | ||
__filename | ||
]).on("close", function(code) { | ||
if (code === 0 || code === 1) { | ||
grepExtensionDef.resolve("--perl-regexp"); | ||
} else { | ||
grepExtensionDef.resolve("--extended-regexp"); | ||
var _grepExtensionP; | ||
function grepExtensionP() { | ||
if (!_grepExtensionP) { | ||
var grepExtensionDef = Q.defer(); | ||
run("grep", [ | ||
"--quiet", | ||
"--perl-regexp", | ||
"spawn", | ||
__filename | ||
]).on("close", function(code) { | ||
if (code === 0 || code === 1) { | ||
grepExtensionDef.resolve("--perl-regexp"); | ||
} else { | ||
grepExtensionDef.resolve("--extended-regexp"); | ||
} | ||
}); | ||
_grepExtensionP = grepExtensionDef.promise; | ||
} | ||
}); | ||
return _grepExtensionP; | ||
} | ||
@@ -98,5 +103,5 @@ function grepP(pattern, sourceDir, grepExtension) { | ||
module.exports = function(pattern, sourceDir) { | ||
return grepExtensionP.then(function(extension) { | ||
return grepExtensionP().then(function(extension) { | ||
return grepP(pattern, sourceDir, extension); | ||
}); | ||
}; |
@@ -17,3 +17,3 @@ { | ||
], | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"license": "MIT", | ||
@@ -20,0 +20,0 @@ "homepage": "http://github.com/benjamn/commoner", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85474
2079