diff --git a/lib/types/json.js b/lib/types/json.js index 30bf8cab..bc2de839 100644 --- a/lib/types/json.js +++ b/lib/types/json.js @@ -189,11 +189,8 @@ function createStrictSyntaxError (str, char) { */ function firstchar (str) { - var match = FIRST_CHAR_REGEXP.exec(str) - - return match - ? match[1] - : undefined + const match = FIRST_CHAR_REGEXP.exec(str) + return match?.[1] } /**