From a4cd8af96a823474b45171e8dabcfa7152820b79 Mon Sep 17 00:00:00 2001 From: SoftwareSpot Date: Thu, 10 Oct 2024 14:09:15 +0300 Subject: [PATCH] refactor(json): fix typo (#6103) --- json/parse_stream.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/json/parse_stream.ts b/json/parse_stream.ts index 17ca89dcd..7e3d04fad 100644 --- a/json/parse_stream.ts +++ b/json/parse_stream.ts @@ -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); } /** @@ -62,7 +62,7 @@ export class JsonParseStream extends TransformStream { super( { transform(chunk, controller) { - if (!isBrankString(chunk)) { + if (!isBlankSpace(chunk)) { controller.enqueue(parse(chunk)); } },