| 9 | const extension = fileName => /(?:\.([^.]+))?$/.exec(fileName)[1]; |
| 10 | |
| 11 | const refineGist = gist => { |
| 12 | const gistId = gist.id; |
| 13 | const title = gist.description; |
| 14 | delete gist.files['algorithm-visualizer']; |
| 15 | const { login, avatar_url } = gist.owner; |
| 16 | const files = Object.values(gist.files).map(file => ({ |
| 17 | name: file.filename, |
| 18 | content: file.content, |
| 19 | contributors: [{ login, avatar_url }], |
| 20 | })); |
| 21 | return { login, gistId, title, files }; |
| 22 | }; |
| 23 | |
| 24 | const createFile = (name, content, contributors) => ({ name, content, contributors }); |
| 25 |
nothing calls this directly
no outgoing calls
no test coverage detected