Skip to content

Commit 14e3555

Browse files
committed
fix: Update README to remove references to callback function
1 parent 527d858 commit 14e3555

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

README.md

+5-14
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ $ npm install read-pubspec
1010

1111
## Usage
1212

13-
```
14-
import path from 'path';
13+
```js
14+
import path from 'node:path';
1515
import { readPubspec } from 'read-pubspec';
1616

1717
process.chdir(path.join(__dirname, '/test'));
@@ -21,30 +21,21 @@ console.log(await readPubspec());
2121

2222
console.log(await readPubspec({ cwd: path.join(process.cwd(), '/sub') }));
2323
//=> { name: 'sub', … }
24-
2524
```
2625

2726
## API
2827

29-
### readPubspec(options?, callback?)
30-
31-
Returns a `Promise<object>` with the parsed YAML.
28+
### readPubspec(options?)
3229

33-
Optionally a callback function may be used instead.
30+
Returns a `Promise<Pubspec>` with the parsed YAML.
3431

3532
#### options
3633

37-
Type: `object`
34+
Type: `ReadPubspecOptions`
3835

3936
#### options.cwd
4037

4138
Type: `string`<br>
4239
Default: `process.cwd()`
4340

4441
Current working directory
45-
46-
#### callback
47-
48-
Type: `Function`
49-
50-
Optional callback with error as the first argument and the parsed YAML as the second.

0 commit comments

Comments
 (0)