@onesub/server 0.23.1 → 0.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -169,11 +169,7 @@ function setLogger(logger) {
169
169
  if (logger) current = logger;
170
170
  }
171
171
  function escapeLineBreaks(value) {
172
- return value.replace(/[\r\n\u2028\u2029]/g, (ch) => {
173
- if (ch === "\n") return "\\n";
174
- if (ch === "\r") return "\\r";
175
- return `\\u${ch.charCodeAt(0).toString(16).padStart(4, "0")}`;
176
- });
172
+ return value.replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
177
173
  }
178
174
  function scrub(args) {
179
175
  return args.map((arg) => typeof arg === "string" ? escapeLineBreaks(arg) : arg);