# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/micromatch.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/micromatch)
> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Table of Contents
<details>
<summary><strong>Details</strong></summary>
- [Install](#install)
- [Quickstart](#quickstart)
- [Why use micromatch?](#why-use-micromatch)
* [Matching features](#matching-features)
- [Switching to micromatch](#switching-to-micromatch)
* [From minimatch](#from-minimatch)
* [From multimatch](#from-multimatch)
- [API](#api)
- [Options](#options)
* [options.basename](#optionsbasename)
* [options.bash](#optionsbash)
* [options.cache](#optionscache)
* [options.dot](#optionsdot)
* [options.failglob](#optionsfailglob)
* [options.ignore](#optionsignore)
* [options.matchBase](#optionsmatchbase)
* [options.nobrace](#optionsnobrace)
* [options.nocase](#optionsnocase)
* [options.nodupes](#optionsnodupes)
* [options.noext](#optionsnoext)
* [options.nonegate](#optionsnonegate)
* [options.noglobstar](#optionsnoglobstar)
* [options.nonull](#optionsnonull)
* [options.nullglob](#optionsnullglob)
* [options.snapdragon](#optionssnapdragon)
* [options.sourcemap](#optionssourcemap)
* [options.unescape](#optionsunescape)
* [options.unixify](#optionsunixify)
- [Extended globbing](#extended-globbing)
* [extglobs](#extglobs)
* [braces](#braces)
* [regex character classes](#regex-character-classes)
* [regex groups](#regex-groups)
* [POSIX bracket expressions](#posix-bracket-expressions)
- [Notes](#notes)
* [Bash 4.3 parity](#bash-43-parity)
* [Backslashes](#backslashes)
- [Contributing](#contributing)
- [Benchmarks](#benchmarks)
* [Running benchmarks](#running-benchmarks)
* [Latest results](#latest-results)
- [About](#about)
</details>
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save micromatch
```
## Quickstart
```js
var mm = require('micromatch');
mm(list, patterns[, options]);
```
The [main export](#micromatch) takes a list of strings and one or more glob patterns:
```js
console.log(mm(['foo', 'bar', 'qux'], ['f*', 'b*']));
//=> ['foo', 'bar']
```
Use [.isMatch()](#ismatch) to get true/false:
```js
console.log(mm.isMatch('foo', 'f*'));
//=> true
```
[Switching](#switching-to-micromatch) from minimatch and multimatch is easy!
## Why use micromatch?
> micromatch is a [drop-in replacement](#switching-to-micromatch) for minimatch and multimatch
* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch)
* Micromatch uses [snapdragon](https://github.com/jonschlinkert/snapdragon) for parsing and compiling globs, which provides granular control over the entire conversion process in a way that is easy to understand, reason about, and maintain.
* More consistently accurate matching [than minimatch](https://github.com/yarnpkg/yarn/pull/3339), with more than 36,000 [test assertions](./test) to prove it.
* More complete support for the Bash 4.3 specification than minimatch and multimatch. In fact, micromatch passes _all of the spec tests_ from bash, including some that bash still fails.
* [Faster matching](#benchmarks), from a combination of optimized glob patterns, faster algorithms, and regex caching.
* [Micromatch is safer](https://github.com/micromatch/braces#braces-is-safe), and is not subject to DoS with brace patterns, like minimatch and multimatch.
* More reliable windows support than minimatch and multimatch.
### Matching features
* Support for multiple glob patterns (no need for wrappers like multimatch)
* Wildcards (`**`, `*.js`)
* Negation (`'!a/*.js'`, `'*!(b).js']`)
* [extglobs](https://github.com/micromatch/extglob) (`+(x|y)`, `!(a|b)`)
* [POSIX character classes](https://github.com/micromatch/expand-brackets) (`[[:alpha:][:digit:]]`)
* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`)
* regex character classes (`foo-[1-5].js`)
* regex logical "or" (`foo/(abc|xyz).js`)
You can mix and match these features to create whatever patterns you need!
## Switching to micromatch
There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information.
### From minimatch
Use [mm.isMatch()](#ismatch) instead of `minimatch()`:
```js
mm.isMatch('foo', 'b*');
//=> false
```
Use [mm.match()](#match) instead of `minimatch.match()`:
```js
mm.match(['foo', 'bar'], 'b*');
//=> 'bar'
```
### From multimatch
Same signature:
```js
mm(['foo', 'bar', 'baz'], ['f*', '*z']);
//=> ['foo', 'baz']
```
## API
### [micromatch](index.js#L41)
The main function takes a list of strings and one or more glob patterns to use for matching.
**Params**
* `list` **{Array}**: A list of strings to match
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Array}**: Returns an array of matches
**Example**
```js
var mm = require('micromatch');
mm(list, patterns[, options]);
console.log(mm(['a.js', 'a.txt'], ['*.js']));
//=> [ 'a.js' ]
```
### [.match](index.js#L93)
Similar to the main function, but `pattern` must be a string.
**Params**
* `list` **{Array}**: Array of strings to match
* `pattern` **{String}**: Glob pattern to use for matching.
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Array}**: Returns an array of matches
**Example**
```js
var mm = require('micromatch');
mm.match(list, pattern[, options]);
console.log(mm.match(['a.a', 'a.aa', 'a.b', 'a.c'], '*.a'));
//=> ['a.a', 'a.aa']
```
### [.isMatch](index.js#L154)
Returns true if the specified `string` matches the given glob `pattern`.
**Params**
* `string` **{String}**: String to match
* `pattern` **{String}**: Glob pattern to use for matching.
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Boolean}**: Returns true if the string matches the glob pattern.
**Example**
```js
var mm = require('micromatch');
mm.isMatch(string, pattern[, options]);
console.log(mm.isMatch('a.a', '*.a'));
//=> true
console.log(mm.isMatch('a.b', '*.a'));
//=> false
```
### [.some](index.js#L192)
Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
**Params**
* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found.
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Boolean}**: Returns true if any patterns match `str`
**Example**
```js
var mm = require('micromatch');
mm.some(list, patterns[, options]);
console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
// true
console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
// false
```
### [.every](index.js#L228)
Returns true if every strin
没有合适的资源?快使用搜索试试~ 我知道了~
基于Vue+SpringBoot+Mybatis Plus+MySql+UniApp的前后端分离在线学习平台系统,包含P.zip
共2001个文件
js:1364个
md:341个
json:145个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 107 浏览量
2024-05-14
13:52:47
上传
评论
收藏 22.74MB ZIP 举报
温馨提示
该项目利用了基于springboot + vue + mysql的开发模式框架实现的课设系统,包括了项目的源码资源、sql文件、相关指引文档等等。 【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。 【技术】 Java、Python、Node.js、Spring Boot、Django、Express、MySQL、PostgreSQL、MongoDB、React、Angular、Vue、Bootstrap、Material-UI、Redis、Docker、Kubernetes
资源推荐
资源详情
资源评论
收起资源包目录
基于Vue+SpringBoot+Mybatis Plus+MySql+UniApp的前后端分离在线学习平台系统,包含P.zip (2001个子文件)
用户手册.docx 7.19MB
.DS_Store 8KB
UserController.java 24KB
StudentController.java 18KB
UserCourseBaseController.java 18KB
CourseController.java 15KB
UserPreferenceController.java 15KB
TalkingsController.java 14KB
ChildCategoryController.java 9KB
AliyunSmsUtils.java 7KB
ParentCategoryController.java 7KB
ChapterController.java 7KB
MysqlGenerator.java 6KB
EmailCodeController.java 5KB
MavenWrapperDownloader.java 5KB
VideoController.java 4KB
CourseCommentController.java 4KB
MessageController.java 4KB
TeacherController.java 4KB
SchoolController.java 4KB
HomeworkController.java 3KB
TelCodeController.java 3KB
FileRestController.java 3KB
InterestSelectionController.java 3KB
CourseSelectionController.java 3KB
Result.java 3KB
CoursePlanController.java 3KB
AdminController.java 3KB
SendMail.java 3KB
DateTool.java 2KB
UploadFileUtil.java 2KB
SwaggerApp.java 2KB
UserBased.java 2KB
JwtUtil1.java 2KB
ItemBased.java 1KB
Talkings.java 1KB
UserCourseBase.java 1KB
Message.java 1KB
Course.java 1KB
Test.java 1KB
Email.java 1KB
EmailCode.java 1KB
MybatisPlusConfig.java 1KB
FileUtils.java 1014B
Teacher.java 965B
FileNameUtils.java 944B
User.java 939B
RandomUtils.java 931B
BaseEntity.java 917B
Homework.java 844B
JDBCDataModelUtil.java 816B
CourseComment.java 802B
UserPreference.java 779B
InterestSelection.java 764B
ChildCategory.java 746B
NonStaticResourceHttpRequestHandler.java 737B
ParentCategory.java 726B
Student.java 719B
CourseSelection.java 717B
CoursePlan.java 706B
Video.java 701B
Chapter.java 697B
TelCode.java 673B
ResultType.java 655B
Admin.java 646B
School.java 623B
CourseSelectionMapper.java 619B
phoneVCode.java 591B
Test.java 459B
InterestSelectionMapper.java 315B
SbApplication.java 306B
UserPreferenceMapper.java 306B
UserCourseBaseMapper.java 306B
ParentCategoryMapper.java 306B
CourseCommentMapper.java 303B
ChildCategoryMapper.java 303B
CoursePlanMapper.java 294B
EmailCodeMapper.java 291B
TalkingsMapper.java 289B
HomeworkMapper.java 288B
TelCodeMapper.java 286B
TeacherMapper.java 285B
StudentMapper.java 285B
ChapterMapper.java 285B
CourseMapper.java 282B
SchoolMapper.java 282B
VideoMapper.java 279B
AdminMapper.java 279B
MessageMapper.java 277B
UserMapper.java 276B
SbApplicationTests.java 206B
BaseController.java 194B
source-map.debug.js 254KB
source-map.js 100KB
index.js 45KB
axios.js 44KB
parser.js 43KB
index.js 42KB
source-map-consumer.js 37KB
emit.js 34KB
共 2001 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
枫蜜柚子茶
- 粉丝: 6704
- 资源: 4871
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功