From 8c7895c11321410968893519fe86a60d98269ed0 Mon Sep 17 00:00:00 2001 From: txxnano Date: Mon, 8 Apr 2024 23:16:15 +0200 Subject: [PATCH] chore(docs): improve migration guide to reflect correct constructor (#74) --- 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