| 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)); | |