Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

to-base64

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-base64

to-base64.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

to-base64

Transform file from local or network to base64 string data

Installation

npm install to-base64

Quick Start

var toBase64 = require('to-base64');

toBase64('https://github.com/favicon.ico', function (result) {
  console.log(result.base64);
  console.log(result.contentType);
}, function (error) {
  console.log(error);
});

APIs

toBase64(String path, Function callback, function onError)

.fromFile(String path, Function callback, Function onError)
.fromURL(String url, Function callback, Function onError)

Todo

  • add fromFile support

License

MIT

Keywords

FAQs

Package last updated on 19 Oct 2013

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc