You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be cool, if this library supports base64 decode and encode natively.
My scenario: I fetch some base64 encoded Json StringFromBase64.pipe(JsonFromString).
Suggested Solution
I'm new to io-ts, so this might not be the correct way to implement it:
exportconstStringFromBase64=newt.Type<string,string,string>('StringFromBase64',(u): u is string=>typeofu==='string',(s,c)=>{try{returnt.success(atob(s));}catch(e){returnt.failure(s,c);}},s=>btoa(s));
The text was updated successfully, but these errors were encountered:
🚀 Feature request
Desired Behavior
Would be cool, if this library supports base64 decode and encode natively.
My scenario: I fetch some base64 encoded Json
StringFromBase64.pipe(JsonFromString)
.Suggested Solution
I'm new to io-ts, so this might not be the correct way to implement it:
The text was updated successfully, but these errors were encountered: