Skip to content

Commit 0796dcf

Browse files
authored
Merge pull request #27 from fastify/faster-string-handling
Faster string serialization
2 parents 2148a38 + 3f06b01 commit 0796dcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ function $asStringSmall (str) {
104104
for (var i = 0; i < l && point >= 32; i++) {
105105
point = str.charCodeAt(i)
106106
if (point === 34 || point === 92) {
107-
result += str.slice(last, i) + '\\' + str[i]
108-
last = i + 1
107+
result += str.slice(last, i) + '\\'
108+
last = i
109109
}
110110
}
111111
if (last === 0) {

0 commit comments

Comments
 (0)