Upgrade Ava to v4

This commit is contained in:
Henry Mercer 2022-02-01 18:01:11 +00:00
parent 9a40cc5274
commit ce89f1b611
1153 changed files with 27264 additions and 95308 deletions

59
node_modules/locate-path/readme.md generated vendored
View file

@ -1,21 +1,19 @@
# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path)
# locate-path
> Get the first path that exists on disk of multiple paths
## Install
```
$ npm install locate-path
```
## Usage
Here we find the first file that exists on disk, in array order.
```js
const locatePath = require('locate-path');
import {locatePath} from 'locate-path';
const files = [
'unicorn.png',
@ -23,16 +21,13 @@ const files = [
'pony.png'
];
(async () => {
console(await locatePath(files));
//=> 'rainbow'
})();
console(await locatePath(files));
//=> 'rainbow'
```
## API
### locatePath(paths, [options])
### locatePath(paths, options?)
Returns a `Promise<string>` for the first path that exists or `undefined` if none exists.
@ -40,23 +35,23 @@ Returns a `Promise<string>` for the first path that exists or `undefined` if non
Type: `Iterable<string>`
Paths to check.
The paths to check.
#### options
Type: `Object`
Type: `object`
##### concurrency
Type: `number`<br>
Default: `Infinity`<br>
Type: `number`\
Default: `Infinity`\
Minimum: `1`
Number of concurrently pending promises.
The number of concurrently pending promises.
##### preserveOrder
Type: `boolean`<br>
Type: `boolean`\
Default: `true`
Preserve `paths` order when searching.
@ -65,27 +60,27 @@ Disable this to improve performance if you don't care about the order.
##### cwd
Type: `string`<br>
Type: `string`\
Default: `process.cwd()`
Current working directory.
The current working directory.
##### type
Type: `string`<br>
Default: `file`<br>
Values: `file` `directory`
Type: `string`\
Default: `'file'`\
Values: `'file' | 'directory'`
The type of paths that can match.
##### allowSymlinks
Type: `boolean`<br>
Type: `boolean`\
Default: `true`
Allow symbolic links to match if they point to the chosen path type.
### locatePath.sync(paths, [options])
### locatePath.sync(paths, options?)
Returns the first path that exists or `undefined` if none exists.
@ -93,11 +88,11 @@ Returns the first path that exists or `undefined` if none exists.
Type: `Iterable<string>`
Paths to check.
The paths to check.
#### options
Type: `Object`
Type: `object`
##### cwd
@ -111,12 +106,18 @@ Same as above.
Same as above.
## Related
- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists
---
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-locate-path?utm_source=npm-locate-path&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>