【文件属性】:
文件名称:image-exists:检查图像是否存在
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-05 23:38:44
JavaScript
形象存在
检查图像是否存在
安装
npm install image-exists
用法
var imageExists = require ( 'image-exists' ) ;
var src = "http://example.com/image.png" ;
imageExists ( src , function ( exists ) {
if ( exists ) {
console . log ( "it's alive!" ) ;
}
else {
console . log ( "oh well" ) ;
}
} ) ;
【文件预览】:
image-exists-master
----index.js(328B)
----package.json(564B)
----LICENSE(1KB)
----.gitignore(587B)
----README.md(339B)