mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-14 14:57:28 +00:00
Parse JSON extension case-insensitively (#29)
Co-authored-by: Codex Microtask Operator <codex-microtask@example.com>
This commit is contained in:
parent
d9cf41e5a3
commit
3ceddaa911
2 changed files with 5 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ export function createValidator() {
|
|||
}
|
||||
|
||||
export function parseDocument(input: string, fileName = "document") {
|
||||
if (fileName.endsWith(".json")) {
|
||||
if (fileName.toLowerCase().endsWith(".json")) {
|
||||
return JSON.parse(input) as unknown;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue