Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buster-glob

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buster-glob - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

7

lib/buster-glob.js

@@ -16,6 +16,11 @@ var B = require("buster-core");

function resolveGlobs(patterns, options) {
options = options || {};
return array(patterns).reduce(function (fns, pattern) {
fns.push(function (done) {
glob(pattern, options, function (err, matches) {
done(err, matches);
if (!err && options.strict && matches.length === 0) {
done(new Error("'" + pattern + "' matched no files"));
} else {
done(err, matches);
}
});

@@ -22,0 +27,0 @@ });

4

package.json
{
"name": "buster-glob",
"version": "0.2.0",
"version": "0.3.0",
"description": "Small wrapper around the glob module that allows globbing for multiple patterns at once",

@@ -22,3 +22,3 @@ "homepage": "http://busterjs.org/buster-glob",

"glob": ">=3.0",
"buster-core": ">=0.5.1"
"buster-core": ">=0.6.0"
},

@@ -25,0 +25,0 @@ "devDependencies": {

@@ -96,3 +96,16 @@ var buster = require("buster");

assert.calledWith(callback, null, ["src/foo.js", "src/bar.js"]);
},
"strict": {
"fails on glob that matches no patterns": function () {
var callback = this.spy();
glob.glob.withArgs("src/foo.js").yields(null, []);
g.glob(["src/foo.js"], { strict: true }, callback);
assert.match(callback.args[0][0], {
message: "'src/foo.js' matched no files"
});
}
}
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc