https://github.com/midwayjs/glob
https://github.com/midwayjs/glob
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/midwayjs/glob
- Owner: midwayjs
- Created: 2020-06-16T03:10:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T06:16:50.000Z (over 3 years ago)
- Last Synced: 2024-04-24T01:21:28.762Z (over 2 years ago)
- Language: TypeScript
- Size: 22.5 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
Awesome Lists containing this project
README
# midway easy glob tools
实现一个基础轻量的 globby,为了兼容 faas-glob 语法,引入纯 js 版的 picomatch 库,除此之外,无其他依赖。
## API
```ts
import { run } from '@midwayjs/glob';
const result = run(['**/*.md'], {
cwd: join(__dirname, './fixtures/first'),
ignore: [
'**/c.md',
'**/bbbb/**'
]
});
console.log(result); // Output: [ '/Users/harry/project/glob/test/fixtures/first/a.md' ]
```