Skip to content

Instantly share code, notes, and snippets.

@nighto
Last active May 7, 2018 14:57
Show Gist options
  • Save nighto/6518da80b903631b542c0f91fa371743 to your computer and use it in GitHub Desktop.
Save nighto/6518da80b903631b542c0f91fa371743 to your computer and use it in GitHub Desktop.
Detro auxiliary scripts
// EXACT TIMES
/* input:
* Origin 12:34
* Origin 23:45
*
* output:
* 12:34, 23:45
*/
e = t => console.log(t.split(`\n`).map(r => { let a = r.split(`\t`); return a[1] }).join(', '))
// INTERVALS
/* input
* Origin 11:22 11:33 15
* Origin 22:11 22:33 15
*
* output
* 11:22-11:33/15, 22:11-22:33/15
*/
i = t => console.log(t.split(`\n`).map(r => { let a = r.split(`\t`); return `${a[1]}-${a[2]}/${a[3]}` }).join(', '))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment