image exists 检查图像是否存在
形象存在检查图像是否存在。安装: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\");
}
});
下载地址
用户评论