Last active
November 17, 2020 13:49
-
-
Save hubgit/c62eef2e5ee1b0688f79b3ebeb831c3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const parseTextContent = (element, selector) => element.querySelector(selector)?.textContent ?? undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const parseTextContent = ( | |
| element: Element, | |
| selector: string | |
| ): string | undefined => | |
| element.querySelector(selector)?.textContent ?? undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment