Last active
June 7, 2017 00:57
-
-
Save choonkending/58fdd75c9637764e3bc1e5934002fcbd to your computer and use it in GitHub Desktop.
This file contains hidden or 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 transformCage = () => { /* ... */ }; | |
const handleError = e => "Invalid or Corrupted User Data"; | |
const handleSuccess = data => "Success"; | |
const doSomethingWithUserData = () => | |
getUserFromLocalStorage('nickCage') | |
.map(transformCage) | |
.fold(handleError, handleSuccess); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment