Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nanianlisao committed Mar 15, 2024
1 parent 8ba6209 commit a1da8b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Expand Up @@ -70,15 +70,15 @@ This can be useful when you want the results to be unaffected by previous calls.
```
import getPort, {clearLockedPorts} from 'get-port';
console.log(await getPort({prot: [3000, 3001, 3002]}));
console.log(await getPort({port: [3000, 3001, 3002]}));
//=> 3000
console.log(await getPort({prot: [3000, 3001, 3002]}));
console.log(await getPort({port: [3000, 3001, 3002]}));
//=> 3001
// If you want your results to be unaffected by previous calls, clear the cache.
clearLockedPorts();
console.log(await getPort({prot: [3000, 3001, 3002]}));
console.log(await getPort({port: [3000, 3001, 3002]}));
//=> 3000
```
*/
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -111,7 +111,7 @@ Type: `number`

The last port of the range. Must be in the range `1024`...`65535` and must be greater than `from`.

### clearLockedPorts
### clearLockedPorts()

Clear the internal cache of locked ports when you want your results to be unaffected by previous calls.

Expand Down

0 comments on commit a1da8b6

Please sign in to comment.