diff --git a/bower.json b/bower.json index b8bcfe9..774ceb8 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "unibabel", "main": "index.js", - "version": "2.1.2", + "version": "2.1.3", "homepage": "https://github.com/coolaj86/unibabel-js", "authors": [ "AJ ONeal " @@ -12,15 +12,21 @@ "node" ], "keywords": [ + "ascii", + "binary", "utf8", "utf-8", "ArrayBuffer", "TypedArrays", + "TypedArray", "Uint", + "Uint8Array", "Base64", - "b64" + "b64", + "Base32", + "b32" ], - "license": "Apache2", + "license": "Apache-2.0", "ignore": [ "**/.*", "node_modules", diff --git a/node.js b/node.js new file mode 100644 index 0000000..3772551 --- /dev/null +++ b/node.js @@ -0,0 +1,19 @@ +'use strict'; + +console.warn("Please don't use Unibabel in node.js. If you think you really think you have a valid use case please report it at https://github.com/coolaj86/unibabel-js/issues/new"); +throw new Error("[unibabel] you're doing it wrong"); + +/* +var data = 'I ½ ♥ 💩'; +var encoding = 'utf8'; +var buf = new Buffer(data, encoding); +buf.toString('hex'); +buf.toString('base64'); +buf.toString('ascii'); +buf.toString('utf8'); +buf.toString('binary'); // deprecated, do not use + +var Base32 = require('thirty-two'); +var b32 = Base32.encode(buf); +Base32.decode(buf); +*/ diff --git a/package.json b/package.json new file mode 100644 index 0000000..c8fad4e --- /dev/null +++ b/package.json @@ -0,0 +1,37 @@ +{ + "name": "unibabel", + "version": "2.1.3", + "description": "Base64, TypedArrays, and UTF-8 / Unicode conversions in Browser (and Node) JavaScript", + "main": "node.js", + "browser": { + "./node.js": "./index.js" + } + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/coolaj86/unibabel-js.git" + }, + "keywords": [ + "ascii", + "binary", + "utf8", + "utf-8", + "ArrayBuffer", + "TypedArrays", + "TypedArray", + "Uint", + "Uint8Array", + "Base64", + "b64", + "Base32", + "b32" + ], + "author": "AJ ONeal (http://coolaj86.com/)", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/coolaj86/unibabel-js/issues" + }, + "homepage": "https://github.com/coolaj86/unibabel-js#readme" +}