const safeBuffer = require('safe-buffer').Buffer function decodeBase64 (base64) { return safeBuffer.from(base64, 'base64').toString('utf8') } function encodeBase64 (string) { return safeBuffer.from(string, 'utf8').toString('base64') } module.exports = { decodeBase64: decodeBase64, encodeBase64: encodeBase64 }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.npmignore | File | 73 B | 0644 |
|
CHANGELOG.md | File | 2.84 KB | 0644 |
|
LICENSE | File | 1.06 KB | 0644 |
|
README.md | File | 1.94 KB | 0644 |
|
base64.js | File | 322 B | 0644 |
|
index.js | File | 3.23 KB | 0644 |
|
package.json | File | 1.91 KB | 0644 |
|
registry-url.js | File | 229 B | 0644 |
|
yarn.lock | File | 50.25 KB | 0644 |
|