ionic-team / ionic-team/trapeze
how to use base64 decode?
- Dominant language
- TypeScript
- Stars
- 377
- Forks
- 50
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
good afternoon, @mlynch thx for https://github.com/ionic-team/trapeze/issues/105 :)
do we have some kind of easy way to decode a base64 string?
for example `$GOOGLE_SERVICE_PLIST_RAW` it's more convenient to store in base64, but you have to decode it.
I suggest to do it:
1. automatically value -> base64 === value
2. or add `from` key with enum`base64`.
```yml
platforms:
ios:
targets:
App:
plist:
- file: GoogleService-Info.plist
xml: $GOOGLE_SERVICE_PLIST_RAW
# add `from` attribute
from: base64
```
**nodejs**:
```ts
const value = Buffer.from(process.env.GOOGLE_SERVICE_PLIST_RAW, 'base64').toString(
'ascii'
)
```
**browser**:
```ts
const value = atob(process.env.GOOGLE_SERVICE_PLIST_RAW)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.