Skip to content

Commit 4c6f2e4

Browse files
authored
fix: spelling in deserializer errors
Edits "to long" -> "too long", "to short" -> "too short"
1 parent 1fb53f3 commit 4c6f2e4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/parser/deserializer.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ function deserializeObject(buffer, index, options, isArray) {
287287
if (binarySize < 0)
288288
throw new Error('Negative binary type element size found for subtype 0x02');
289289
if (binarySize > totalBinarySize - 4)
290-
throw new Error('Binary type with subtype 0x02 contains to long binary size');
290+
throw new Error('Binary type with subtype 0x02 contains too long binary size');
291291
if (binarySize < totalBinarySize - 4)
292-
throw new Error('Binary type with subtype 0x02 contains to short binary size');
292+
throw new Error('Binary type with subtype 0x02 contains too short binary size');
293293
}
294294

295295
if (promoteBuffers && promoteValues) {
@@ -312,9 +312,9 @@ function deserializeObject(buffer, index, options, isArray) {
312312
if (binarySize < 0)
313313
throw new Error('Negative binary type element size found for subtype 0x02');
314314
if (binarySize > totalBinarySize - 4)
315-
throw new Error('Binary type with subtype 0x02 contains to long binary size');
315+
throw new Error('Binary type with subtype 0x02 contains too long binary size');
316316
if (binarySize < totalBinarySize - 4)
317-
throw new Error('Binary type with subtype 0x02 contains to short binary size');
317+
throw new Error('Binary type with subtype 0x02 contains too short binary size');
318318
}
319319

320320
// Copy the data
@@ -508,14 +508,14 @@ function deserializeObject(buffer, index, options, isArray) {
508508
// Adjust the index
509509
index = index + objectSize;
510510

511-
// Check if field length is to short
511+
// Check if field length is too short
512512
if (totalSize < 4 + 4 + objectSize + stringSize) {
513-
throw new Error('code_w_scope total size is to short, truncating scope');
513+
throw new Error('code_w_scope total size is too short, truncating scope');
514514
}
515515

516-
// Check if totalSize field is to long
516+
// Check if totalSize field is too long
517517
if (totalSize > 4 + 4 + objectSize + stringSize) {
518-
throw new Error('code_w_scope total size is to long, clips outer document');
518+
throw new Error('code_w_scope total size is too long, clips outer document');
519519
}
520520

521521
// If we are evaluating the functions

0 commit comments

Comments
 (0)