Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 25, 2024 via pnpm

picomatch 2.3.1

Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
Package summary
Share
0
issues
1
license
1
MIT
Package created
5 Nov 2018
Version published
2 Jan 2022
Maintainers
4
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
picomatch@2.3.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of picomatch 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does picomatch do?

Picomatch is a blazing fast and accurate glob matcher written in JavaScript with no dependencies. It extends full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. This makes it suitable for matching inputs against certain patterns or conditions, which could be leveraged to perform variety of tasks. For instance, it could be used as a file matcher for a task runner, or to match routes in a web application.

How do you use picomatch?

To use Picomatch, you would first need to install it via npm by running npm install --save picomatch. After successful installation, you can import it in your JavaScript file using const pm = require('picomatch');.

With Picomatch imported, you can take advantage of its primary function that takes a glob pattern and returns a matcher function. For example:

const pm = require('picomatch');

// Create a matcher function using glob pattern '*.js'
const isMatch = pm('*.js');

// Test with different strings
console.log(isMatch('abcd')); // Output: false
console.log(isMatch('a.js')); // Output: true
console.log(isMatch('a.md')); // Output: false
console.log(isMatch('a/b.js')); // Output: false

In the above example, isMatch is a matcher function that checks if a string ends with '.js'. Therefore, it would return true for 'a.js' and false for others.

Where are the picomatch docs?

Picomatch's full documentation is included in its readme, which lays out its API, globbing features, options, and benchmarks for comparison with other libraries. You can find additional information and get deeper insights about advanced features such as brace expansion, POSIX brackets, and extglobs directly from the readme content. For more detailed glob pattern matching guides, you can check out the bash documentation referred in the readme.

To refer to Picomatch's documentation, visit its GitHub repository at https://github.com/micromatch/picomatch.