Skip to content

Commit 91ed041

Browse files
committed
Update the documentation [skip ci]
1 parent 3c2ae03 commit 91ed041

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ npm install @cedx/which
2626
### 2. Import it
2727
Now in your [JavaScript](https://developer.mozilla.org/docs/Web/JavaScript) code, you can use:
2828

29-
```javascript
29+
```js
3030
import which from "@cedx/which";
3131
```

docs/usage/api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This function takes the name of the command to locate, and returns a `ResultSet`
1111
The `ResultSet.all()` method returns a `Promise` that resolves with the absolute paths of all instances of an executable found in the system path.
1212
If the executable could not be located, the promise rejects.
1313

14-
```javascript
14+
```js
1515
import console from "node:console";
1616
import which from "@cedx/which";
1717

@@ -29,7 +29,7 @@ catch (error) {
2929
The `ResultSet.first()` method returns a `Promise` that resolves with the absolute path of the first instance of an executable found in the system path.
3030
If the executable could not be located, the promise rejects.
3131

32-
```javascript
32+
```js
3333
import console from "node:console";
3434
import which from "@cedx/which";
3535

@@ -45,7 +45,7 @@ catch (error) {
4545
### **stream()**: AsyncGenerator<string>
4646
The `ResultSet.stream()` method returns an asynchronous generator that yields the absolute path of the instances of an executable found in the system path.
4747

48-
```javascript
48+
```js
4949
import console from "node:console";
5050
import which from "@cedx/which";
5151

@@ -65,7 +65,7 @@ The behavior of the `which(command: string, options?: FinderOptions)` function c
6565
An array of strings specifying the list of executable file extensions.
6666
On Windows, defaults to the list of extensions provided by the `PATHEXT` environment variable.
6767

68-
```javascript
68+
```js
6969
which("foobar", {extensions: [".foo", ".exe", ".cmd"]});
7070
```
7171

@@ -75,6 +75,6 @@ which("foobar", {extensions: [".foo", ".exe", ".cmd"]});
7575
An array of strings specifying the system paths from which the given command will be searched.
7676
Defaults to the list of directories provided by the `PATH` environment variable.
7777

78-
```javascript
78+
```js
7979
which("foobar", {paths: ["/usr/local/bin", "/usr/bin"]});
8080
```

0 commit comments

Comments
 (0)