aboutsummaryrefslogtreecommitdiff
path: root/node_modules/find-up/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/find-up/readme.md')
-rw-r--r--node_modules/find-up/readme.md33
1 files changed, 23 insertions, 10 deletions
diff --git a/node_modules/find-up/readme.md b/node_modules/find-up/readme.md
index 9ea0611c3..b5ad69455 100644
--- a/node_modules/find-up/readme.md
+++ b/node_modules/find-up/readme.md
@@ -1,4 +1,4 @@
-# find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up)
+# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)
> Find a file by walking up parent directories
@@ -15,12 +15,12 @@ $ npm install --save find-up
```
/
└── Users
- └── sindresorhus
- ├── unicorn.png
- └── foo
- └── bar
- ├── baz
- └── example.js
+ └── sindresorhus
+ ├── unicorn.png
+ └── foo
+ └── bar
+ ├── baz
+ └── example.js
```
```js
@@ -31,6 +31,11 @@ findUp('unicorn.png').then(filepath => {
console.log(filepath);
//=> '/Users/sindresorhus/unicorn.png'
});
+
+findUp(['rainbow.png', 'unicorn.png']).then(filepath => {
+ console.log(filepath);
+ //=> '/Users/sindresorhus/unicorn.png'
+});
```
@@ -38,12 +43,20 @@ findUp('unicorn.png').then(filepath => {
### findUp(filename, [options])
-Returns a promise for the filepath or `null`.
+Returns a `Promise` for the filepath or `null`.
+
+### findUp([filenameA, filenameB], [options])
+
+Returns a `Promise` for the first filepath found (by respecting the order) or `null`.
### findUp.sync(filename, [options])
Returns a filepath or `null`.
+### findUp.sync([filenameA, filenameB], [options])
+
+Returns the first filepath found (by respecting the order) or `null`.
+
#### filename
Type: `string`
@@ -54,7 +67,7 @@ Filename of the file to find.
##### cwd
-Type: `string`
+Type: `string`<br>
Default: `process.cwd()`
Directory to start from.
@@ -69,4 +82,4 @@ Directory to start from.
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT © [Sindre Sorhus](https://sindresorhus.com)