first commit
This commit is contained in:
commit
b216a187bd
34 changed files with 4829 additions and 0 deletions
11
Static/js/readJson.js
Normal file
11
Static/js/readJson.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
const readJson = (filePath) => {
|
||||
return fetch(filePath)
|
||||
.then(response => {
|
||||
if(!response.ok) {
|
||||
throw new Error(`Erreur lors du chargement du fichier JSON : ${response.statusText}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
};
|
||||
|
||||
export { readJson };
|
||||
Loading…
Add table
Add a link
Reference in a new issue