Skip to content

Commit 59ce4f7

Browse files
authored
chore(perf): fast regex (#696)
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
1 parent a63ed55 commit 59ce4f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/serializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
// eslint-disable-next-line
4-
const STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/
4+
const STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/
55

66
module.exports = class Serializer {
77
constructor (options) {

0 commit comments

Comments
 (0)