We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5262ee0 commit 2fec476Copy full SHA for 2fec476
lib/serializer.js
@@ -2,7 +2,6 @@
2
3
// eslint-disable-next-line
4
const STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/
5
-const MAGIC_NUMBER = 42
6
7
module.exports = class Serializer {
8
constructor (options) {
@@ -93,7 +92,7 @@ module.exports = class Serializer {
93
92
94
asString (str) {
95
const len = str.length
96
- if (len < MAGIC_NUMBER) {
+ if (len < 42) {
97
// magically escape strings for json
98
// relying on their charCodeAt
99
// everything below 32 needs JSON.stringify()
0 commit comments