Skip to content

Commit 3b5afaa

Browse files
authored
Return single strings without quotes (#18)
* return single strings without quotes * Fix
1 parent 50a2922 commit 3b5afaa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ export function objectSize(node: Record<string, any> | Array<any>) {
99
}
1010

1111
export function stringifyForCopying(node: any, space?: string | number | undefined) {
12+
// return single string nodes without quotes
13+
if (typeof node === 'string') {
14+
return node
15+
}
16+
1217
try {
1318
return JSON.stringify(
1419
node,

0 commit comments

Comments
 (0)