Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
is-valid-glob
Advanced tools
Return true if a value is a valid glob pattern or patterns.
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.
Install with npm
$ npm i is-valid-glob --save
var isValidGlob = require('is-valid-glob');
isValidGlob('foo/*.js');
//=> true
Valid patterns
isValidGlob('a');
isValidGlob('a.js');
isValidGlob('*.js');
isValidGlob(['a', 'b']);
isValidGlob([]);
//=> all true
Invalid patterns
isValidGlob();
isValidGlob('');
isValidGlob({});
isValidGlob(null);
isValidGlob(undefined);
isValidGlob(new Buffer('foo'));
isValidGlob(['foo', [[]]]);
isValidGlob(['foo', [['bar']]]);
isValidGlob(['foo', {}]);
isValidGlob(['']);
//=> all false
true
if the given string looks like a glob pattern.Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 07, 2015.
FAQs
Return true if a value is a valid glob pattern or patterns.
The npm package is-valid-glob receives a total of 2,011,258 weekly downloads. As such, is-valid-glob popularity was classified as popular.
We found that is-valid-glob demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.