Created
June 24, 2017 14:29
-
-
Save kofno/b3963f175f70d1368aea69438e384894 to your computer and use it in GitHub Desktop.
string decoder
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
| import { string } from 'jsonous'; | |
| const decoder = string(); | |
| decoder.decodeAny("foo"); // --> Ok("foo") | |
| decoder.decodeAnt(8); // --> Err("Expected to find a string. Instead found 8") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment