Skip to content

Commit 9d19b39

Browse files
authored
Merge pull request #67 from Geoxor/patch-1
feat: make fixed message only print when verbose
2 parents 4bc9ef9 + 69bc880 commit 9d19b39

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ const doubleCheck = (data, options = {}) => {
1616
const verbose = options.verbose;
1717
try {
1818
const res = parse(data);
19-
psw(`\n${chalk.cyan('The JSON data was fixed!')}`);
20-
if (res) {
21-
return options.parse ? res : data;
22-
}
19+
if (verbose) psw(`\n${chalk.cyan('The JSON data was fixed!')}`);
20+
if (res) return options.parse ? res : data;
2321
} catch (err) {
2422
if (verbose) {
2523
psw('Nearly fixed data:');

0 commit comments

Comments
 (0)