Skip to content

Commit

Permalink
chore(docs): improve migration guide to reflect correct constructor (#74
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Warkanlock committed Apr 8, 2024
1 parent 150cef3 commit 8c7895c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/migration-guides/5-to-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ const { number: numberFormatter, string: stringFormatter, stringExcel: stringExc
These 2 methods are equivalent to:

```js
const { Parser } = require('@json2csv/plainjs');
const parse = (data, opts) => new Parser(opts).parse(data);

const parseAsync = (data, opts, transformOpts) => new NodeAsyncParser(opts, transformOpts).parse(data).promise();
const { AsyncParser } = require('@json2csv/node');
const parseAsync = (data, opts, transformOpts) => new AsyncParser(opts, transformOpts).parse(data).promise();
```

## AsyncParser changes
Expand Down

0 comments on commit 8c7895c

Please sign in to comment.