Comparing version 4.1.2-beta to 4.1.2
10
glob.js
@@ -65,4 +65,7 @@ // Approach: | ||
if (options.sync) | ||
if (options.sync) { | ||
if (cb) | ||
throw new TypeError('callback provided to sync glob') | ||
return globSync(pattern, options) | ||
} | ||
@@ -83,4 +86,7 @@ return new Glob(pattern, options, cb) | ||
if (options && options.sync) | ||
if (options && options.sync) { | ||
if (cb) | ||
throw new TypeError('callback provided to sync glob') | ||
return new GlobSync(pattern, options) | ||
} | ||
@@ -87,0 +93,0 @@ if (!(this instanceof Glob)) |
@@ -5,3 +5,3 @@ { | ||
"description": "a little globber", | ||
"version": "4.1.2-beta", | ||
"version": "4.1.2", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -19,2 +19,5 @@ module.exports = globSync | ||
function globSync (pattern, options) { | ||
if (typeof options === 'function' || arguments.length === 3) | ||
throw new TypeError('callback provided to sync glob') | ||
return new GlobSync(pattern, options).found | ||
@@ -27,2 +30,5 @@ } | ||
if (typeof options === 'function' || arguments.length === 3) | ||
throw new TypeError('callback provided to sync glob') | ||
if (!(this instanceof GlobSync)) | ||
@@ -29,0 +35,0 @@ return new GlobSync(pattern, options) |
@@ -111,2 +111,3 @@ { | ||
"./test/stat.js", | ||
"./test/sync-cb-throw.js", | ||
"./test/zz-cleanup.js", | ||
@@ -113,0 +114,0 @@ "/tmp/glob-test/asdf", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
68268
33
1913
1