You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/api.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This function takes the name of the command to locate, and returns a `ResultSet`
11
11
The `ResultSet.all()` method returns a `Promise` that resolves with the absolute paths of all instances of an executable found in the system path.
12
12
If the executable could not be located, the promise rejects.
13
13
14
-
```javascript
14
+
```js
15
15
importconsolefrom"node:console";
16
16
importwhichfrom"@cedx/which";
17
17
@@ -29,7 +29,7 @@ catch (error) {
29
29
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.
30
30
If the executable could not be located, the promise rejects.
31
31
32
-
```javascript
32
+
```js
33
33
importconsolefrom"node:console";
34
34
importwhichfrom"@cedx/which";
35
35
@@ -45,7 +45,7 @@ catch (error) {
45
45
### **stream()**: AsyncGenerator<string>
46
46
The `ResultSet.stream()` method returns an asynchronous generator that yields the absolute path of the instances of an executable found in the system path.
47
47
48
-
```javascript
48
+
```js
49
49
importconsolefrom"node:console";
50
50
importwhichfrom"@cedx/which";
51
51
@@ -65,7 +65,7 @@ The behavior of the `which(command: string, options?: FinderOptions)` function c
65
65
An array of strings specifying the list of executable file extensions.
66
66
On Windows, defaults to the list of extensions provided by the `PATHEXT` environment variable.
0 commit comments