Skip to content

Instantly share code, notes, and snippets.

@Javiani
Created July 21, 2019 00:59
Show Gist options
  • Save Javiani/d7e463a422f47c5c1f053f082aeb1c23 to your computer and use it in GitHub Desktop.
Save Javiani/d7e463a422f47c5c1f053f082aeb1c23 to your computer and use it in GitHub Desktop.
Snippets for Medium
const firstname = Maybe(() => data.personsFirstName[0].value)
.catch( _ => 'Firstname' )
const middleName = Maybe(() => data.personsMiddleName[0].value)
.catch( _ => 'Middlename')
const lastname = Maybe(() => data.personsLastName[0].value)
.catch( _ => 'Lastname' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment