AJ ONeal
9 years ago
3 changed files with 65 additions and 3 deletions
@ -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); |
||||
|
*/ |
@ -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 <coolaj86@gmail.com> (http://coolaj86.com/)", |
||||
|
"license": "Apache-2.0", |
||||
|
"bugs": { |
||||
|
"url": "https://github.com/coolaj86/unibabel-js/issues" |
||||
|
}, |
||||
|
"homepage": "https://github.com/coolaj86/unibabel-js#readme" |
||||
|
} |
Loading…
Reference in new issue