Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into submap-refactoring

This commit is contained in:
Azgaar 2024-11-11 13:30:47 +01:00
commit fb48f5d57a
18 changed files with 511 additions and 73 deletions

View file

@ -56,3 +56,11 @@ JSON.isValid = str => {
}
return true;
};
JSON.safeParse = str => {
try {
return JSON.parse(str);
} catch (e) {
return null;
}
};