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

is-valid-glob

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-valid-glob - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

4

index.js
'use strict';
module.exports = function isValidGlob(glob) {
if (typeof glob === 'string') {
if (typeof glob === 'string' && glob.length > 0) {
return true;

@@ -16,3 +16,3 @@ }

while (len--) {
if (typeof arr[len] !== 'string') {
if (typeof arr[len] !== 'string' || arr[len].length <= 0) {
return false;

@@ -19,0 +19,0 @@ }

{
"name": "is-valid-glob",
"description": "Return true if a value is a valid glob pattern.",
"version": "0.1.0",
"description": "Return true if a value is a valid glob pattern or patterns.",
"version": "0.2.0",
"homepage": "https://github.com/jonschlinkert/is-valid-glob",

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

},
"dependencies": {},
"devDependencies": {

@@ -39,2 +38,2 @@ "mocha": "*"

]
}
}
# is-valid-glob [![NPM version](https://badge.fury.io/js/is-valid-glob.svg)](http://badge.fury.io/js/is-valid-glob)
> Return true if a value is a valid glob pattern.
> Return true if a value is a valid glob pattern or patterns.

@@ -31,3 +31,2 @@ This really just checks to make sure that a pattern is either a string or array, and if it's an array it's either empty or consists of only strings.

isValidGlob(['a', 'b']);
isValidGlob('');
isValidGlob([]);

@@ -41,2 +40,3 @@ //=> all true

isValidGlob();
isValidGlob('');
isValidGlob({});

@@ -49,2 +49,3 @@ isValidGlob(null);

isValidGlob(['foo', {}]);
isValidGlob(['']);
//=> all false

@@ -87,2 +88,2 @@ ```

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 01, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 07, 2015._
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