Skip to content

Instantly share code, notes, and snippets.

@johanmynhardt
Created May 9, 2019 19:34
Show Gist options
  • Save johanmynhardt/a942de286f69b94258efebcc893f31b0 to your computer and use it in GitHub Desktop.
Save johanmynhardt/a942de286f69b94258efebcc893f31b0 to your computer and use it in GitHub Desktop.
const renderTSV = input => input
.split('\n')
.map(r => r.replace(/\t/g, ' __ '))
.join('\n');
const parseIDs = input => input
.split(/(\d{4,})/)
.map(x => x.trim())
.filter(x => new RegExp(/\d+/).exec(x))
.map(Number)
.sort();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment