chore: fix lint

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
This commit is contained in:
Wing-Kam Wong
2022-04-20 17:53:29 +08:00
parent c8e9571751
commit 180accda2a
18 changed files with 95 additions and 104 deletions

View File

@@ -1,22 +1,22 @@
const imageExt = [
"jpeg",
"gif",
"png",
"png",
"svg",
"bmp",
"ico",
"jpg",
"webp",
];
'jpeg',
'gif',
'png',
'png',
'svg',
'bmp',
'ico',
'jpg',
'webp'
]
export default imageExt;
export default imageExt
const isImage = (name) => {
return imageExt.some((e) => name.toLowerCase().endsWith(`.${e}`));
};
return imageExt.some(e => name.toLowerCase().endsWith(`.${e}`))
}
export { isImage };
export { isImage }
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*