1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.isImageValid = isImageValid;
|
7 | function isImageValid(src) {
|
8 | return new Promise(function (resolve) {
|
9 | var img = document.createElement('img');
|
10 | img.onerror = function () {
|
11 | return resolve(false);
|
12 | };
|
13 | img.onload = function () {
|
14 | return resolve(true);
|
15 | };
|
16 | img.src = src;
|
17 | });
|
18 | } |
\ | No newline at end of file |