Socket
Socket
Sign inDemoInstall

@huang.xinghui/base64image

Package Overview
Dependencies
23
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @huang.xinghui/base64image

image base64 encoder


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

#base64image

image base64 encoder

Install

Node.js 4 or higher

$ npm install @huang.xinghui/base64image --save

Usage

// Stream Usage
var base64image = require('@huang.xinghui/base64image')
// imagePath can be a url path, such as 'http://example.com/assets/img.png'
// or a absolute path, such as 'C:/foo/img.png'
// or a releative path, such as './img.png'
base64image.stream(imagePath).pipe(process.stdout)

// Common Usage
var base64image = require('@huang.xinghui/base64image')
base64image(imagePath).then(function(data) {
  console.log(data)
})

API

  • base64image(imagePath) base64 encode image, return Promise
  • base64image.stream(imagePath) base64 encode image, return Stream

Keywords

FAQs

Last updated on 13 Jun 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc