Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 24, 2024 via pnpm

anymatch 3.1.3

Matches strings against configurable strings, globs, regular expressions, and/or functions
Package summary
Share
0
issues
2
licenses
2
MIT
1
ISC
Package created
25 Nov 2013
Version published
21 Nov 2022
Maintainers
5
Total deps
3
Direct deps
2
License
ISC

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
2 Packages, Including:
normalize-path@3.0.0
picomatch@2.3.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
anymatch@3.1.3
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

2
All Dependencies CSV
β“˜ This is a list of anymatch 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
normalize-path3.0.03.48 kBMIT
prod
picomatch2.3.123.72 kBMIT
prod

Visualizations

Frequently Asked Questions

What does anymatch do?

Anymatch is a useful JavaScript module designed to facilitate string matching against configurable strings, globs, regular expressions, or functions. With a particular emphasis on file paths, its functionality plays an integral role in allowing user-configurable designs that are flexibly designed. Anymatch accomplishes its objectives by directly matching a string, using a string with glob patterns, conducting regular expression tests, or through a function that takes test string as an argument and returns a truthy value if a match should be made.

How do you use anymatch?

To use Anymatch, you begin by installing it via npm using the command npm install anymatch. After installation, it can be used by invoking the anymatch function and passing in the matchers and testString.

Here's a quick code example:

const anymatch = require('anymatch');

const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ;

anymatch(matchers, 'path/to/file.js'); // true
anymatch(matchers, 'path/anyjs/baz.js'); // true
anymatch(matchers, 'path/to/foo.js'); // true
anymatch(matchers, 'path/to/bar.js'); // true
anymatch(matchers, 'bar.js'); // false

// returnIndex = true
anymatch(matchers, 'foo.js', {returnIndex: true}); // 2
anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1

Anymatch also supports curried functions, providing a function that is already bound to the provided matching criteria.

Where are the anymatch docs?

The details and documentation on how to use Anymatch can be found on its GitHub page at https://github.com/micromatch/anymatch. These docs provide a comprehensive guide on how to use Anymatch, covering all the parameters and options, and also illustrating examples on how to best utilize this JavaScript module.