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