npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

btoa-atob

0.1.2 • Public • Published

btoa-atob

NodeJS-based command line utility to convert files to base64 and vice versa.

Installation

If you have npm:

 
$ sudo npm install btoa-atob -g
 

If not:

 
$ sudo make install
 

Usage

See btoa --help and atob --help.

Flags:

-p	--prefix		The content of the file before output.
-s	--suffix		The content of the file after output.
-o	--output-to-file	The file to write the output to. If not specified, write to stdout.

Examples

Convert file-a into base64 and write the data to file-b

 
$ btoa file-a -o file-b
 

Convert a string from stdin back from base64 and output to stdout

 
echo "ZXhhbXBsZQo=" | atob
 

Convert contents of file-a to base64 and write into a javascript file assigning it to a var called filedata

 
$ btoa file-a -p "var filedata = '" -s "'" -o filedata.js
 

MIT License

Keywords

none

install

npm i btoa-atob

Downloadsweekly downloads

350

version

0.1.2

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability