josdejong/jsonrepair

Exporting parse function

オープン

#154 opened on 2026/02/22

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (88 件のフォーク)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (2,397 個のスター)
PR merge metrics
 (平均マージ 26d 22h) (30d で 2 merged PRs)

説明

👋 @josdejong! Great useful package!

I found myself doing this in a few places:

const repairedJson = jsonrepair(rawJson);
const parsedJson = JSON.parse(repairedJson);

This works well, but could be more efficient:

const parsedJson = repairAndParseJson(rawJson);

If this is available to end users, jsonrepair won't have to serialize a repaired structure back to a string. As a result, less memory and CPU will be used. WDYT of exposing some kind of a repair and parse function for the library?

コントリビューターガイド