# @jswork/wildcard-match

> A function for matching strings using * wildcard patterns.

Latest version **1.0.1** (published 2024-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jswork/wildcard-match
pnpm add @jswork/wildcard-match
yarn add @jswork/wildcard-match
bun add @jswork/wildcard-match
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-09-07 |
| First published | 2024-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | afeiship |
| Keywords | fast, glob, match, star, wildcard |

## Links

- npm: https://www.npmjs.com/package/@jswork/wildcard-match
- npm.io page: https://npm.io/package/@jswork/wildcard-match

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-09-07

## README

# wildcard-match
> A function for matching strings using * wildcard patterns.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```shell
npm install @jswork/wildcard-match
```

## usage
```js
import wildcardMatch from '@jswork/wildcard-match';

// 测试案例
console.log(wildcardMatch("filename.txt", "*name")); // false
console.log(wildcardMatch("filename.txt", "name*")); // false
console.log(wildcardMatch("filename.txt", "*name*")); // true
console.log(wildcardMatch("abcfilenameabc", "*xx*name*xx*")); // false
console.log(wildcardMatch("xxabcnamexx", "*xx*name*xx*")); // true
```

## license
Code released under [the MIT license](https://github.com/afeiship/wildcard-match/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/wildcard-match
[version-url]: https://npmjs.org/package/@jswork/wildcard-match

[license-image]: https://img.shields.io/npm/l/@jswork/wildcard-match
[license-url]: https://github.com/afeiship/wildcard-match/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/wildcard-match
[size-url]: https://github.com/afeiship/wildcard-match/blob/master/dist/index.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/wildcard-match
[download-url]: https://www.npmjs.com/package/@jswork/wildcard-match

---
_Source: https://npm.io/package/@jswork/wildcard-match · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
