Skip to content

Commit

Permalink
docs: add missing @ in formatters readme & migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed Feb 12, 2024
1 parent c46a756 commit 4e945e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/migration-guides/5-to-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ const csv = json2csvParser.parse(myData);
should be replaced by

```js
const { stringExcel: stringExcelFormatter } = require('json2csv/formatters');
const Parser = require('json2csv/Parser');
const { stringExcel: stringExcelFormatter } = require('@json2csv/formatters');
const { Parser } = require('@json2csv/plainjs');
const json2csvParser = new Parser({
formatters: {
string: stringExcelFormatter,
Expand Down
2 changes: 1 addition & 1 deletion packages/formatters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ As with the sample transform in the previous section, the reason to wrap the act
Keep in mind that the above example doesn't quote or escape the string which is problematic. A more realistic example could use our built-in string formatted to do the quoting and escaping like:

```js
import { string as defaultStringFormatter } from 'json2csv/formatters';
import { string as defaultStringFormatter } from '@json2csv/formatters';

const fixedLengthStringFormatter = (stringLength, ellipsis = '...', stringFormatter = defaultStringFormatter()) =>
(item) =>
Expand Down

0 comments on commit 4e945e8

Please sign in to comment.