Socket
Socket
Sign inDemoInstall

extglob

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extglob

Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.


Version published
Weekly downloads
13M
increased by0.28%
Maintainers
1
Weekly downloads
 
Created

What is extglob?

The extglob npm package provides extended globbing capabilities with support for advanced pattern matching. It allows users to create more complex and flexible glob patterns for matching file paths and strings.

What are extglob's main functionalities?

Basic Pattern Matching

This feature allows users to create basic pattern matching using extended glob syntax. The example demonstrates a pattern that matches 'ad', 'abd', or 'acd'.

const extglob = require('extglob');
const pattern = 'a?(b|c)d';
console.log(extglob(pattern)); // => 'a?(b|c)d'

Negation

This feature allows users to create patterns that exclude certain matches. The example demonstrates a pattern that matches anything except 'a' or 'b'.

const extglob = require('extglob');
const pattern = '!(a|b)';
console.log(extglob(pattern)); // => '!(a|b)'

Character Classes

This feature allows users to create patterns using character classes. The example demonstrates a pattern that matches 'a' followed by any character except 'b', followed by 'c'.

const extglob = require('extglob');
const pattern = 'a[!b]c';
console.log(extglob(pattern)); // => 'a[!b]c'

Multiple Patterns

This feature allows users to create patterns that match one or more occurrences of the specified patterns. The example demonstrates a pattern that matches 'abd', 'abcd', 'abbcd', etc.

const extglob = require('extglob');
const pattern = 'a+(b|c)d';
console.log(extglob(pattern)); // => 'a+(b|c)d'

Other packages similar to extglob

Keywords

FAQs

Package last updated on 11 Dec 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