Skip to content

Commit

Permalink
stringify: removes a slice of very very old logic ported from JSON2.j…
Browse files Browse the repository at this point in the history
…s, which is no more necessary
  • Loading branch information
kaelzhang committed Aug 11, 2020
1 parent 360b7ce commit aa234e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/stringify.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const escape = string => {
const c = meta[a]
return typeof c === 'string'
? c
: `\\u${(`0000${a.charCodeAt(0).toString(16)}`).slice(- 4)}`
: a
})
}

Expand Down
1 change: 1 addition & 0 deletions test/stringify.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {parse, stringify, assign} = require('..')

const SUBJECTS = [
'abc',
'\u00ad\u0600',
1,
true,
false,
Expand Down

0 comments on commit aa234e5

Please sign in to comment.