1.0.5 • Published 4 years ago

available-image v1.0.5

Weekly downloads
6
License
MIT
Repository
-
Last release
4 years ago

获取可用的图片地址

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);
})();
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago