diff --git a/browser-atob.js b/browser-atob.js index 3eb0262..f5fc8bc 100644 --- a/browser-atob.js +++ b/browser-atob.js @@ -29,4 +29,8 @@ } w.atob = atob; + + if (typeof module !== 'undefined') { + module.exports = atob; + } }(window)); diff --git a/test.js b/test.js index f8903d0..e499dd5 100644 --- a/test.js +++ b/test.js @@ -2,7 +2,7 @@ (function () { "use strict"; - var atob = require('./index') + var atob = require('.') , encoded = "SGVsbG8gV29ybGQ=" , unencoded = "Hello World" /*