AJ ONeal
13 years ago
commit
aacae887e8
3 changed files with 41 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
(function () { |
|||
"use strict"; |
|||
|
|||
function atob(str) { |
|||
return new Buffer(str, 'utf8').toString('base64'); |
|||
} |
|||
|
|||
module.exports = atob; |
|||
}()); |
@ -0,0 +1,18 @@ |
|||
{ |
|||
"name" : "atob", |
|||
"homepage" : "https://github.com/coolaj86/node-browser-compat", |
|||
"description" : "atob for Node.JS (it's a one-liner)", |
|||
"repository" : { |
|||
"type": "git", |
|||
"url": "git://github.com/coolaj86/node-browser-compat.git" |
|||
}, |
|||
"keywords" : ["atob", "browser"], |
|||
"author" : "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)", |
|||
"engines" : { |
|||
"node": ">= 0.4.0" |
|||
}, |
|||
"dependencies" : { |
|||
}, |
|||
"main" : "index", |
|||
"version" : "1.0.0" |
|||
} |
@ -0,0 +1,14 @@ |
|||
(function () { |
|||
"use strict"; |
|||
|
|||
var atob = require('./index') |
|||
, expected = "SGVsbG8gV29ybGQ=" |
|||
, result |
|||
; |
|||
|
|||
if (expected !== atob("Hello World")) { |
|||
return; |
|||
} |
|||
|
|||
console.log('[PASS] all tests pass'); |
|||
}()); |
Loading…
Reference in new issue