(path: string)
| 1 | import fs from 'fs/promises' |
| 2 | |
| 3 | export default async function getReadme(path: string) { |
| 4 | return fs |
| 5 | .readFile(`./${path}/README.md`, 'utf8') |
| 6 | .then((str) => str) |
| 7 | .catch((err) => { |
| 8 | if (err.code !== 'ENOENT') throw err |
| 9 | }) |
| 10 | } |