From 55ab80120897a890f6d44b8597dee39f3bda83a7 Mon Sep 17 00:00:00 2001 From: Warkanlock Date: Fri, 5 Apr 2024 09:53:48 +0200 Subject: [PATCH] chore(docs): improve migration guide to reflect correct constructor --- docs/migration-guides/5-to-6.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/migration-guides/5-to-6.md b/docs/migration-guides/5-to-6.md index 9d6d288..ef07149 100644 --- a/docs/migration-guides/5-to-6.md +++ b/docs/migration-guides/5-to-6.md @@ -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