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

has-glob

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-glob

Returns `true` if an array has a glob pattern.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
increased by11.32%
Maintainers
1
Weekly downloads
 
Created

What is has-glob?

The has-glob npm package is a utility that checks if a string contains a glob pattern. It is useful for determining whether a given string should be treated as a glob pattern, which is often used in file matching and searching operations.

What are has-glob's main functionalities?

Check if a string contains a glob pattern

This feature allows you to check if a given string contains a glob pattern. In the code sample, the string 'src/**/*.js' is checked, and the result is true because it contains a glob pattern.

const hasGlob = require('has-glob');

const result = hasGlob('src/**/*.js');
console.log(result); // true

Check if a string does not contain a glob pattern

This feature allows you to check if a given string does not contain a glob pattern. In the code sample, the string 'src/index.js' is checked, and the result is false because it does not contain a glob pattern.

const hasGlob = require('has-glob');

const result = hasGlob('src/index.js');
console.log(result); // false

Other packages similar to has-glob

Keywords

FAQs

Package last updated on 08 Sep 2016

Did you know?

Socket

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.

Install

Related posts

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