Socket
Socket
Sign inDemoInstall

parse-glob

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-glob - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

13

index.js

@@ -11,2 +11,3 @@ /*!

var pathRe = require('glob-path-regex');
var isGlob = require('is-glob');

@@ -26,4 +27,6 @@ /**

module.exports = function parseGlob(pattern) {
// leave `pattern` unmodified
var glob = pattern;
var tok = {};
tok.isGlob = isGlob(pattern);

@@ -72,7 +75,7 @@ var braces = pattern.indexOf('{') !== -1;

if (braces) {
tok.dirname = unescape(tok.dirname);
tok.filename = unescape(tok.filename);
tok.basename = unescape(tok.basename);
tok.extname = unescape(tok.extname);
tok.ext = unescape(tok.ext);
tok.dirname = tok.dirname ? unescape(tok.dirname) : '';
tok.filename = tok.filename ? unescape(tok.filename) : '';
tok.basename = tok.basename ? unescape(tok.basename) : '';
tok.extname = tok.extname ? unescape(tok.extname) : '';
tok.ext = tok.ext ? unescape(tok.ext) : '';
}

@@ -79,0 +82,0 @@

{
"name": "parse-glob",
"description": "Parse a glob pattern into an object of path parts.",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/jonschlinkert/parse-glob",

@@ -32,3 +32,4 @@ "author": {

"dependencies": {
"glob-path-regex": "^1.0.0"
"glob-path-regex": "^1.0.0",
"is-glob": "^1.1.0"
},

@@ -35,0 +36,0 @@ "devDependencies": {

@@ -23,3 +23,4 @@ # parse-glob [![NPM version](https://badge.fury.io/js/parse-glob.svg)](http://badge.fury.io/js/parse-glob)

```js
{ pattern: 'a/b/{c,.gitignore,{a,b}}/{a,b}/*.foo.js',
{ isGlob: true,
pattern: 'a/b/{c,.gitignore,{a,b}}/{a,b}/*.foo.js',
dirname: 'a/b/{c,.gitignore,{a,b}}/{a,b}/',

@@ -32,3 +33,3 @@ filename: '*.foo.js',

// detects when a glob pattern intentionally
// specifies dotfiles
// specifies dotfiles or dot directories (e.g. './.git/')
dotfiles: false,

@@ -35,0 +36,0 @@ dotdirs: false }

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