Releases: azu/validate-image-type
Releases · azu/validate-image-type
v3.0.0
Breaking Changes
- Require Node.js 18+
Features
- Support 'avif' format
Dependencies
- Update https://github.com/sindresorhus/file-type/releases/tag/v18.0.0
- Update https://github.com/sindresorhus/is-svg/releases/tag/v5.0.0
- Update https://github.com/sindresorhus/read-chunk/releases/tag/v4.0.0
Changelogs
Full Changelog: v2.0.0...v3.0.0
v2.0.0
BREAKING CHANGES
- expose API as async function
- require Node.js 14+
import { validateMIMEType } from "validate-image-type";
- const result = validateMIMEType("./image.png", {
+ const result = await validateMIMEType("./image.png", {
allowMimeTypes: ['image/jpeg', 'image/gif', 'image/png', 'image/svg+xml']
});
if (!result.ok) {
console.error(result.error);
return;
}
console.log("This image is supported!");
What's Changed
Full Changelog: v1.2.0...v2.0.0
v1.2.0
Features
- added support for svg file buffer in validateBufferMIMEType by @harjotscs in #3
New Contributors
- @harjotscs made their first contribution in #3
Full Changelog: v1.1.1...v1.2.0