Socket
Socket
Sign inDemoInstall

is-glob

Package Overview
Dependencies
1
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.1.0

14

index.js

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

module.exports = function isGlob(str) {
if (!str || typeof str !== 'string') {
if (typeof str !== 'string' || str === '') {
return false;

@@ -17,9 +17,11 @@ }

if (isExtglob(str)) return true;
var m, matches = [];
while ((m = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/g.exec(str))) {
if (m[2]) matches.push(m[2]);
str = str.slice(m.index + m[0].length);
var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/;
var match;
while ((match = regex.exec(str))) {
if (match[2]) return true;
str = str.slice(match.index + match[0].length);
}
return matches.length > 0;
return false;
};
{
"name": "is-glob",
"description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
"version": "3.0.0",
"version": "3.1.0",
"homepage": "https://github.com/jonschlinkert/is-glob",

@@ -17,5 +17,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"files": [
"index.js",
"LICENSE",
"README.md"
"index.js"
],

@@ -30,3 +28,3 @@ "main": "index.js",

"dependencies": {
"is-extglob": "^2.0.0"
"is-extglob": "^2.1.0"
},

@@ -33,0 +31,0 @@ "devDependencies": {

@@ -103,2 +103,9 @@ # is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob)

### Contributors
| **Commits** | **Contributor**<br/> |
| --- | --- |
| 40 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [tuvistavie](https://github.com/tuvistavie) |
### Building docs

@@ -136,2 +143,2 @@

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 03, 2016._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc