Open aymericbouzy opened 4 years ago
Tested on react-native, apparently does not work :( I don't know if there are any workaround
Tested on react-native, apparently does not work :( I don't know if there are any workaround
https://github.com/ahuggins-nhs/base64url-xplatform https://www.npmjs.com/package/base64url-xplatform
In browser:
import { Base64Url } from 'https://cdn.jsdelivr.net/npm/base64url-xplatform@1.0.1/esm/index.js'
window.Base64Url = Base64Url
There is also a class called "BufferShim" which is exported and it can be used to work with string and ArrayBuffer to go to and from base64 and UTF8.
I'm having a hard time figuring out in what JS environment will this package work. It makes a clear mention of Node.js but no mention of browser or React Native.