Skip to content

Commit 7492d1d

Browse files
committed
chore: formatting
1 parent db6b57b commit 7492d1d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/serialization/json/src/jsonParseNode.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ export class JsonParseNode implements ParseNode {
5151
/**
5252
* Node.js Buffer objects created via Buffer.from() use a shared memory pool
5353
* and may be subject to reuse/recycling, which can lead to unexpected behavior.
54-
*
54+
*
5555
* For consistent behavior across environments:
5656
* - In Node: We convert the base64 string to a Buffer first, then create a new
5757
* Uint8Array from it to ensure we have a stable, independent copy
5858
* - In browsers: We convert the string directly using TextEncoder
59-
*
60-
* TODO: Consider standardizing on a cross-platform UInt8Array.fromBase64 (after the API is stabilized across browsers)
59+
*
60+
* TODO: Consider standardizing on a cross-platform UInt8Array.fromBase64 (after the API is stabilized across browsers)
6161
* in the future instead of the current environment-specific approach
6262
*/
6363
return inNodeEnv() ? new Uint8Array(Buffer.from(strValue, "base64")).buffer : new TextEncoder().encode(strValue);

packages/serialization/text/src/textParseNode.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export class TextParseNode implements ParseNode {
2323
/**
2424
* Node.js Buffer objects created via Buffer.from() use a shared memory pool
2525
* and may be subject to reuse/recycling, which can lead to unexpected behavior.
26-
*
26+
*
2727
* For consistent behavior across environments:
2828
* - In Node: We convert the base64 string to a Buffer first, then create a new
2929
* Uint8Array from it to ensure we have a stable, independent copy
3030
* - In browsers: We convert the string directly using TextEncoder
31-
*
32-
* TODO: Consider standardizing on a cross-platform UInt8Array.fromBase64 (after the API is stabilized across browsers)
31+
*
32+
* TODO: Consider standardizing on a cross-platform UInt8Array.fromBase64 (after the API is stabilized across browsers)
3333
* in the future instead of the current environment-specific approach
3434
*/
3535
return inNodeEnv() ? new Uint8Array(Buffer.from(strValue, "base64")).buffer : new TextEncoder().encode(strValue);

0 commit comments

Comments
 (0)