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

available-image

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

available-image

intro component

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

获取可用的图片地址

available-image

  • 作者:千绪
  • 仓库地址:https://github.com/kulelikule/available-image

Get an available image address

  • 📦 0.7kb mini library
  • 💪 Easy to use api

Install

npm install available-image -S

Usage

import getImageUrl from 'available-image';

(async () => {
  // image url
  const baseUrl = await getImageUrl(['Non-existent.png', 'https://www.baidu.com/img/bd_logo1.png']);
  console.log(baseUrl);

  // base64 image
  const base64Url = await getImageUrl(['Non-existent.png', 'data:image/jpeg;base64,/9j/4AAQSkZJRgABA...']);
  console.log(base64Url);
})();

Keywords

FAQs

Package last updated on 09 Nov 2020

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