(path: string, tree: RepoTree)
| 59 | window.repoNotes = window.repoNotes || {}; |
| 60 | |
| 61 | function getFile(path: string, tree: RepoTree) { |
| 62 | const segments = path.split('/'); |
| 63 | let obj: RepoTree = tree; |
| 64 | while (obj && segments.length) { |
| 65 | obj = obj[segments.shift() as string] as RepoTree; |
| 66 | } |
| 67 | return (obj as unknown as RepoFile) || {}; |
| 68 | } |
| 69 | |
| 70 | function writeFile(path: string, content: string | AssetProxy, tree: RepoTree) { |
| 71 | const segments = path.split('/'); |
no outgoing calls
no test coverage detected