added cli tool

This commit is contained in:
AJ ONeal 2012-06-26 13:28:01 -06:00
parent c3c29706f6
commit 6547214a62
2 changed files with 30 additions and 16 deletions

10
bin/btoa.js Normal file
View File

@ -0,0 +1,10 @@
#!/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]));
}());

View File

@ -1,18 +1,22 @@
{ {
"name" : "btoa", "name": "btoa",
"homepage" : "https://github.com/coolaj86/node-browser-compat", "homepage": "https://github.com/coolaj86/node-browser-compat",
"description" : "btoa for Node.JS (it's a one-liner)", "description": "btoa for Node.JS (it's a one-liner)",
"repository" : { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/coolaj86/node-browser-compat.git" "url": "git://github.com/coolaj86/node-browser-compat.git"
}, },
"keywords" : ["btoa", "browser"], "keywords": [
"author" : "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)", "btoa",
"engines" : { "browser"
"node": ">= 0.4.0" ],
}, "author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)",
"dependencies" : { "engines": {
}, "node": ">= 0.4.0"
"main" : "index", },
"version" : "1.0.0" "bin": {
"btoa": "bin/btoa.js"
},
"main": "index",
"version": "1.0.1"
} }