Socket
Book a DemoInstallSign in
Socket

btoa-atob

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btoa-atob

CLI tools to convert files and stdin into and from base64.

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
1.2K
28.43%
Maintainers
1
Weekly downloads
 
Created
Source

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

base64

FAQs

Package last updated on 13 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.