Skip to content

Commit

Permalink
refactor(json): fix typo (#6103)
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarespot authored Oct 10, 2024
1 parent 345e74f commit a4cd8af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions json/parse_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import type { JsonValue } from "./types.ts";
import { parse } from "./_common.ts";

const branks = /^[ \t\r\n]*$/;
function isBrankString(str: string) {
return branks.test(str);
const blanks = /^[ \t\r\n]*$/;
function isBlankSpace(str: string) {
return blanks.test(str);
}

/**
Expand Down Expand Up @@ -62,7 +62,7 @@ export class JsonParseStream extends TransformStream<string, JsonValue> {
super(
{
transform(chunk, controller) {
if (!isBrankString(chunk)) {
if (!isBlankSpace(chunk)) {
controller.enqueue(parse(chunk));
}
},
Expand Down

0 comments on commit a4cd8af

Please sign in to comment.