🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

url-conversion-base64

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-conversion-base64

image url 转换成 base64 image url conversion base64

1.0.2
latest
Source
npm
Version published
Maintainers
1
Created
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

image

FAQs

Package last updated on 02 Jun 2019

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