Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): improve migration guide to reflect correct constructor #74

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading