Skip to content

Commit 535df5b

Browse files
committed
Update README.md [skip ci]
1 parent f8119ba commit 535df5b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ doxdox also features support for extendibility via custom plugins for both parsi
2020

2121
```javascript
2222
/**
23-
* Finds package.json from either the directory the script was called from or a supplied path.
23+
* Request content from URL or array of URLs.
2424
*
25-
* console.log(await findFileInPath('./'));
26-
* console.log(await findFileInPath('./package.json'));
27-
* console.log(await findFileInPath('~/git/github/doxdox/'));
28-
*
29-
* @param {string} [input] Directory to check for file.
30-
* @param {string?} [fileName = 'package.json'] File name to check for.
31-
* @return {Promise<string | null>} Path to package.json file.
25+
* @example fetch('http://www.google.com/humans.txt').then(content => console.log(content));
26+
* @example fetch(['http://www.google.com/humans.txt']).then(contents => console.log(content[0]));
27+
* @param {String|String[]} urls A URL or an array of URL strings.
28+
* @param {Object} [options] Options object.
29+
* @param {String} [options.cacheDirectory] Directory to store cache. Default is `temp/cache/`.
30+
* @param {Object} [options.requestOptions] Custom request options object. Default is `{}`.
31+
* @param {Number} [options.ttl] TTL (Time to live) in seconds. Default is 1800
32+
* @return {Promise<String[]>} Contents of request as an array.
3233
* @public
3334
*/
3435
```

0 commit comments

Comments
 (0)