From 001cf59083fb77c8f9e784922a7b19c6a23c1e4f Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 20 May 2014 09:03:48 -0600 Subject: [PATCH] point to new repo --- atob/README.md | 21 +++------------------ atob/bin/atob.js | 10 ---------- atob/index.js | 9 --------- atob/package.json | 23 ----------------------- atob/test.js | 20 -------------------- btoa/README.md | 21 +++------------------ btoa/bin/btoa.js | 10 ---------- btoa/index.js | 18 ------------------ btoa/package.json | 23 ----------------------- btoa/test.js | 16 ---------------- 10 files changed, 6 insertions(+), 165 deletions(-) delete mode 100644 atob/bin/atob.js delete mode 100644 atob/index.js delete mode 100644 atob/package.json delete mode 100644 atob/test.js delete mode 100644 btoa/bin/btoa.js delete mode 100644 btoa/index.js delete mode 100644 btoa/package.json delete mode 100644 btoa/test.js diff --git a/atob/README.md b/atob/README.md index 5f43a23..5e0b068 100644 --- a/atob/README.md +++ b/atob/README.md @@ -1,19 +1,4 @@ -atob -=== +MOVED +==== -Uses `Buffer` to emulate the exact functionality of the browser's atob. - -Note: Unicode may be handled incorrectly (like the browser). - -It turns base64-encoded **a**scii data back **to** **b**inary. - - (function () { - "use strict"; - - var atob = require('atob') - , b64 = "SGVsbG8gV29ybGQ=" - , bin = atob(b64) - ; - - console.log(bin); // "Hello World" - }()); +Now at https://github.com/node-browser-compat/atob diff --git a/atob/bin/atob.js b/atob/bin/atob.js deleted file mode 100644 index 5b008a7..0000000 --- a/atob/bin/atob.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/ -(function () { - "use strict"; - - var atob = require('../index') - ; - - console.log(atob(process.argv[2])); -}()); diff --git a/atob/index.js b/atob/index.js deleted file mode 100644 index e95f1e3..0000000 --- a/atob/index.js +++ /dev/null @@ -1,9 +0,0 @@ -(function () { - "use strict"; - - function atob(str) { - return new Buffer(str, 'base64').toString('binary'); - } - - module.exports = atob; -}()); diff --git a/atob/package.json b/atob/package.json deleted file mode 100644 index 1dd9948..0000000 --- a/atob/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "atob", - "homepage": "https://github.com/coolaj86/node-browser-compat", - "description": "atob for Node.JS and Linux / Mac / Windows CLI (it's a one-liner)", - "repository": { - "type": "git", - "url": "git://github.com/coolaj86/node-browser-compat.git" - }, - "keywords": [ - "atob", - "browser" - ], - "author": "AJ ONeal (http://coolaj86.info)", - "engines": { - "node": ">= 0.4.0" - }, - "main": "index", - "bin": { - "atob": "bin/atob.js" - }, - "license": "Apache2", - "version": "1.1.0" -} diff --git a/atob/test.js b/atob/test.js deleted file mode 100644 index f8903d0..0000000 --- a/atob/test.js +++ /dev/null @@ -1,20 +0,0 @@ -/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/ -(function () { - "use strict"; - - var atob = require('./index') - , encoded = "SGVsbG8gV29ybGQ=" - , unencoded = "Hello World" - /* - , encoded = "SGVsbG8sIBZM" - , unencoded = "Hello, 世界" - */ - ; - - if (unencoded !== atob(encoded)) { - console.log('[FAIL]', unencoded, atob(encoded)); - return; - } - - console.log('[PASS] all tests pass'); -}()); diff --git a/btoa/README.md b/btoa/README.md index 4a03995..eb13210 100644 --- a/btoa/README.md +++ b/btoa/README.md @@ -1,19 +1,4 @@ -btoa -=== +MOVED +==== -Uses `Buffer` to emulate the exact functionality of the browser's btoa (except that it supports unicode and the browser may not). - -It turns **b**inary data **to** base64-encoded **a**scii. - - (function () { - "use strict"; - - var btoa = require('btoa') - , bin = "Hello, 世界" - , b64 = btoa(bin) - ; - - console.log(b64); // "SGVsbG8sIBZM" - }()); - -Note: Unicode may or may not be handled incorrectly. +Now at https://github.com/node-browser-compat/btoa diff --git a/btoa/bin/btoa.js b/btoa/bin/btoa.js deleted file mode 100644 index 091d1df..0000000 --- a/btoa/bin/btoa.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/ -(function () { - "use strict"; - - var btoa = require('../index') - ; - - console.log(btoa(process.argv[2])); -}()); diff --git a/btoa/index.js b/btoa/index.js deleted file mode 100644 index ea124bf..0000000 --- a/btoa/index.js +++ /dev/null @@ -1,18 +0,0 @@ -(function () { - "use strict"; - - function btoa(str) { - var buffer - ; - - if (str instanceof Buffer) { - buffer = str; - } else { - buffer = new Buffer(str.toString(), 'binary'); - } - - return buffer.toString('base64'); - } - - module.exports = btoa; -}()); diff --git a/btoa/package.json b/btoa/package.json deleted file mode 100644 index 0e970a7..0000000 --- a/btoa/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "btoa", - "homepage": "https://github.com/coolaj86/node-browser-compat", - "description": "btoa for Node.JS (it's a one-liner)", - "repository": { - "type": "git", - "url": "git://github.com/coolaj86/node-browser-compat.git" - }, - "keywords": [ - "btoa", - "browser" - ], - "author": "AJ ONeal (http://coolaj86.info)", - "engines": { - "node": ">= 0.4.0" - }, - "bin": { - "btoa": "bin/btoa.js" - }, - "main": "index", - "license": "Apache2", - "version": "1.1.1" -} diff --git a/btoa/test.js b/btoa/test.js deleted file mode 100644 index d57f94e..0000000 --- a/btoa/test.js +++ /dev/null @@ -1,16 +0,0 @@ -/*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/ -(function () { - "use strict"; - - var btoa = require('./index') - , encoded = "SGVsbG8sIBZM" - , unencoded = "Hello, 世界" - ; - - if (encoded !== btoa(unencoded)) { - console.error('[FAIL]', encoded, btoa(unencoded)); - return; - } - - console.log('[PASS] all tests pass'); -}());