# 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
没有合适的资源?快使用搜索试试~ 我知道了~
毕业设计:基于SpringBoot+MySql+UniApp的前后端分离在线学习平台系统-1.zip
共2001个文件
js:1367个
md:341个
json:145个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 18 浏览量
2024-06-10
08:20:20
上传
评论
收藏 22.58MB ZIP 举报
温馨提示
该资源内项目源码是个人的课程设计,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! ## 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。 该资源内项目源码是个人的课程设计,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! ## 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计:基于SpringBoot+MySql+UniApp的前后端分离在线学习平台系统-1.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
资源评论
毕业小助手
- 粉丝: 2766
- 资源: 5583
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 高速追剪程序,定长追剪,威纶触摸屏+汇川5u全套程序,注释清楚
- H3C命令查询工具.zip
- Ubuntu 20.04 LTS安装与优化全流程指南
- 改进鲸鱼优化算法(IWOA,自己融合了多策略改进,名字自己取的破涕为笑),改进包括circle混沌映射,自适应阈值,非线性收敛因子,以及自适应权重和levy飞行策略,具体公式会在readme说明文
- 课程设计大作业-基于python+tkinter+MySQL的选课系统源码(95分以上)
- 西门子PLC屏幕编辑器WIN11可安装板
- STM32单片机开发的串口双机模拟汽车电量里程项目,两个STM32单片机进行数据交互,模拟主控与驱动传感器发送数据,可以手动调节数据,并显示屏显示出来 包括程序源码和protues仿真8.12版本
- 人形机器人灵巧手行业产业链图谱
- 润达医疗(体外诊断产品及技术研发商,上海润达医疗科技股份有限公司)创投信息
- python学生选课信息管理系统源码(tkinter+MySQL)高分项目
- 伺服系统转动惯量离线辨识算法仿真 1.模型简介 模型为永磁同步电机伺服控制仿真,采用Matlab R2018a Simulink搭建 模型内主要包含DC直流电压源、三相逆变器、永磁同步电机、
- HTML环境中WebSocket的应用解析及优化技巧
- MATLAB环境下一种基于深度学习的癫痫发作自动检测方法 算法运行环境为MATLAB R2021b,执行基于深度学习(LSTM)的癫痫发作自动检测 压缩包=程序+数据+参考 运行需要GPU,需要
- dsafagaghjj
- sprinboot+vue+mysql(保证能运行)
- 考虑用户舒适度的冷热电多能互补综合能源系统优化调度-邹云阳 主要内容: 针对综合能源系统优化调度的研究,具体包括: 1.建立含风光、P2G、燃气轮机、燃气锅炉等多能耦合元件的运行特性模型 2.电、热、
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功