Socket
Socket
Sign inDemoInstall

url-conversion-base64

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    url-conversion-base64

image url 转换成 base64 image url conversion base64


Version published
Weekly downloads
12
decreased by-29.41%
Maintainers
1
Install size
2.02 kB
Created
Weekly downloads
 

Readme

Source

url-conversion-base64

image url 转换成 base64 image url conversion base64

install

npm install --save url-conversion-base64

use

const urlConversionBase64 = require("url-conversion-base64");

let url = `http://dearzoe.coding.me/blogImg/images/touxiang.jpg`;
//参数 string
async function getImageBase64() {
  let base64 = await urlConversionBase64(url);
  console.log(base64);
}

// 输出 =>
`data:image/png;base64,iVBORw0KG...`;

Keywords

FAQs

Last updated on 02 Jun 2019

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