首次放到 git
This commit is contained in:
13
utils/base64.js
Normal file
13
utils/base64.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var convert = require('./convert');
|
||||
|
||||
module.exports = {
|
||||
decode: function(textData) {
|
||||
return convert.arrayify(new Buffer(textData, 'base64'));
|
||||
},
|
||||
|
||||
encode: function(data) {
|
||||
return (new Buffer(convert.arrayify(data))).toString('base64');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user