(links, result)
| 4 | |
| 5 | // Function to filter links from an external source |
| 6 | const getLinks = (links, result) => { |
| 7 | links.forEach((link) => { |
| 8 | if (link.subLinks) { |
| 9 | getLinks(link.subLinks, result); |
| 10 | } else { |
| 11 | // only take the links that are in the docs |
| 12 | if (link.link.indexOf("/c/docs") !== -1) { |
| 13 | try { |
| 14 | const url = new URL(link.link); |
| 15 | result.push(url.pathname); |
| 16 | } catch (e) { |
| 17 | result.push(link.link); |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | }); |
| 22 | return result; |
| 23 | }; |
| 24 | |
| 25 | const helper = async () => { |
| 26 | const pathnames = ["/c/docs/developers"]; |
nothing calls this directly
no outgoing calls
no test coverage detected