Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 18, 2018
1 parent b136378 commit b880c3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
15 changes: 8 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@ $ npm install find-up
└── example.js
```

`example.js`

```js
// example.js
const findUp = require('find-up');

findUp('unicorn.png').then(filepath => {
console.log(filepath);
(async () => {
console.log(await findUp('unicorn.png'));
//=> '/Users/sindresorhus/unicorn.png'
});

findUp(['rainbow.png', 'unicorn.png']).then(filepath => {
console.log(filepath);
console.log(await findUp(['rainbow.png', 'unicorn.png']));
//=> '/Users/sindresorhus/unicorn.png'
});
})();
```


Expand Down Expand Up @@ -65,6 +64,8 @@ Filename of the file to find.

#### options

Type: `Object`

##### cwd

Type: `string`<br>
Expand Down

0 comments on commit b880c3a

Please sign in to comment.