From 59ce4f7e773006c16e2520335836cd7f29600720 Mon Sep 17 00:00:00 2001 From: francesco Date: Mon, 18 Mar 2024 17:26:16 +0100 Subject: [PATCH] chore(perf): fast regex (#696) 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) {