Last active
October 3, 2018 21:08
-
-
Save matepaiva/a2b96ecc78311ff353ee79fce1fae36b to your computer and use it in GitHub Desktop.
Parse bank transaction sms string to mapped object
This file contains 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 getValueBetween = (str) => (startDelimiter, endDelimiter) => | |
str.split(startDelimiter).pop().split(endDelimiter).shift().trim(); | |
const getValueStartingAt = (str) => (startDelimiter, numberOfChars = Infinity) => | |
str.split(startDelimiter).pop().slice(0, numberOfChars).trim(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment