Socket
Socket
Sign inDemoInstall

globule

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globule - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

LICENSE

23

lib/globule.js

@@ -42,2 +42,8 @@ /*

// Normalize paths to be unix-style.
var pathSeparatorRe = /[\/\\]/g;
function normalizePath(path) {
return path.replace(pathSeparatorRe, '/');
}
// Match a filepath or filepaths against one or more wildcard patterns. Returns

@@ -50,4 +56,4 @@ // all matching filepaths. This behaves just like minimatch.match, but supports

// Normalize patterns and filepaths to flattened arrays.
patterns = _.isArray(patterns) ? _.flatten(patterns) : [patterns];
filepaths = _.isArray(filepaths) ? _.flatten(filepaths) : [filepaths];
patterns = _.isArray(patterns) ? _.flattenDeep(patterns) : [patterns];
filepaths = _.isArray(filepaths) ? _.flattenDeep(filepaths) : [filepaths];
// Return empty set if there are no patterns or filepaths.

@@ -76,5 +82,5 @@ if (patterns.length === 0 || filepaths.length === 0) { return []; }

if (options.src) {
patterns = _.isArray(options.src) ? _.flatten(options.src) : [options.src];
patterns = _.isArray(options.src) ? _.flattenDeep(options.src) : [options.src];
} else {
patterns = _.flatten(args);
patterns = _.flattenDeep(args);
}

@@ -96,3 +102,3 @@ // Return empty set if there are no patterns.

matches = matches.map(function(filepath) {
return path.join(srcBase, filepath);
return normalizePath(path.join(srcBase, filepath));
});

@@ -106,3 +112,3 @@ }

if (srcBase && !options.prefixBase) {
filepath = path.join(srcBase, filepath);
filepath = normalizePath(path.join(srcBase, filepath));
}

@@ -125,3 +131,2 @@ try {

var pathSeparatorRe = /[\/\\]/g;
var extDotRe = {

@@ -166,4 +171,4 @@ first: /(\.[^\/]*)?$/,

// Normalize filepaths to be unix-style.
dest = dest.replace(pathSeparatorRe, '/');
src = src.replace(pathSeparatorRe, '/');
dest = normalizePath(dest);
src = normalizePath(src);
// Map correct src path to dest path.

@@ -170,0 +175,0 @@ if (fileByDest[dest]) {

{
"name": "globule",
"description": "An easy-to-use wildcard globbing library.",
"version": "0.2.0",
"version": "1.0.0",
"homepage": "https://github.com/cowboy/node-globule",

@@ -17,20 +17,18 @@ "author": {

},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/cowboy/node-globule/blob/master/LICENSE-MIT"
}
"license": "MIT",
"main": "lib/globule",
"files": [
"lib"
],
"main": "lib/globule",
"engines": {
"node": ">= 0.8.0"
"node": ">= 0.10"
},
"scripts": {
"test": "grunt nodeunit"
"test": "grunt"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-nodeunit": "~0.2.2",
"grunt-contrib-watch": "~0.5.3",
"grunt": "~0.4.2"
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt": "^1.0.0"
},

@@ -49,6 +47,6 @@ "keywords": [

"dependencies": {
"lodash": "~2.4.1",
"glob": "~3.2.7",
"minimatch": "~0.2.11"
"glob": "~7.0.3",
"lodash": "~4.9.0",
"minimatch": "~3.0.0"
}
}

@@ -1,2 +0,2 @@

# globule [![Build Status](https://secure.travis-ci.org/cowboy/node-globule.png?branch=master)](http://travis-ci.org/cowboy/node-globule)
# globule [![Build Status: Linux](https://travis-ci.org/cowboy/node-globule.svg?branch=master)](https://travis-ci.org/cowboy/node-globule) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/i9fnc38q952r9nc0/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/node-globule/branch/master)

@@ -122,7 +122,8 @@ An easy-to-use wildcard globbing library.

## Release History
2014-01-07 - v0.2.0 - Updated dependencies. Added `src` option. Improved exclusion speed significantly.
2016-04-14 - v1.0.0 - Update dependencies, lodash@4.9, glob@7.0, minimatch@3.0. Paths are unix-style with prefixBase enabled.
2014-01-07 - v0.2.0 - Updated dependencies. Added `src` option. Improved exclusion speed significantly.
2013-04-11 - v0.1.0 - Initial release.
## License
Copyright (c) 2014 "Cowboy" Ben Alman
Copyright (c) 2016 "Cowboy" Ben Alman
Licensed under the MIT license.
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