From adb29a124755c176138599998ee9d13400921bb4 Mon Sep 17 00:00:00 2001 From: francesco Date: Wed, 13 Mar 2024 14:22:50 +0100 Subject: [PATCH] chore(perf): fast regex Signed-off-by: francesco --- lib/serializer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/serializer.js b/lib/serializer.js index 387e8927..3e290c24 100644 --- a/lib/serializer.js +++ b/lib/serializer.js @@ -1,7 +1,7 @@ 'use strict' // eslint-disable-next-line -const STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/ +const STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/ module.exports = class Serializer { constructor (options) {