josdejong/jsonrepair

Exporting parse function

Aperta

#154 aperta il 22 feb 2026

 (4 commenti) (0 reazioni) (0 assegnatari)TypeScript (88 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (2397 stelle)
Metriche merge PR
 (Merge medio 26g 22h) (2 PR mergiate in 30 g)

Descrizione

👋 @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?

Guida contributor