Created
February 10, 2021 07:45
-
-
Save ridomin/db71d86bbb03a0c33b48f324adc0ddd9 to your computer and use it in GitHub Desktop.
geLlinesFromTextArea.js
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
/** | |
* @param {string} id - element id | |
* @returns {HTMLElement} | |
*/ | |
const gbid = (id) => { | |
const el = document.getElementById(id) | |
if (el === null) { | |
throw new Error('element not found: ' + id) | |
} | |
return el | |
} | |
const lines = gbid('repos').value.replace(/(\r\n|\n|\r)/gm, '').split(';') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment