Skip to content

Commit

Permalink
feat(base64.js): Introduce simple base64 wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed May 30, 2018
1 parent c7b5562 commit ab5d54d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions base64.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict'

const base64 = require('base-x')(
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
)

function encode(value) {
return base64.encode(value)
}

function decode(value) {
return base64.decode(value)
}

module.exports = {
encode,
decode,
}

0 comments on commit ab5d54d

Please sign in to comment.