Skip to content

Instantly share code, notes, and snippets.

@dhoko
Created July 26, 2016 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhoko/4970f1f22340fdc062acbe414a2b34f1 to your computer and use it in GitHub Desktop.
Save dhoko/4970f1f22340fdc062acbe414a2b34f1 to your computer and use it in GitHub Desktop.
$$('span.value:last-of-type')
.map(node => node.textContent.trim())
.filter(txt => txt.indexOf('EUR') === 0)
.map(txt => txt.split('EUR')[1].trim().replace(',','.'))
.reduce((a,b) => a + +b, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment