File size: 603 Bytes
313c51c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
async function json() {
// const response = await fetch(url);
// if (!response.ok) throw new Error(`fetch failed: ${response.status}`);
// return await response.json();
return [
{"name": "Sputnik 1", "year": 2020, "y": 1},
{"name": "Apollo 11", "year": 2021, "y": 2},
{"name": "Viking 1 and 2", "year": 2022, "y": 4},
{"name": "Space Shuttle Columbia", "year": 2023, "y": 8},
{"name": "Hubble Space Telescope", "year": 2024, "y": 16},
{"name": "ISS Construction", "year": 2025, "y": 32}
];
}
const graph = await json();
process.stdout.write(JSON.stringify(graph));
|