Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

exports.atob = function atob(val) {
return new Buffer(val, 'base64').toString();
return new Buffer.from(val, 'base64').toString();
};

exports.btoa = function btoa(val) {
return new Buffer(val).toString('base64');
return Buffer.from(val).toString('base64');
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isomorphic-base64",
"version": "1.0.2",
"version": "1.1.0",
"description": "atob and btoa for browsers or node",
"main": "index.js",
"browser": "browser.js",
Expand Down