'use strict';

const fileType = require('file-type');

module.exports = function isCwebpReadable(buf) {
	const type = fileType(buf);

	if (!type) {
		return false;
	}

	const ext = type.ext;

	return ext === 'png' || ext === 'jpg' || ext === 'tif' || ext === 'webp';
};

@@ -172,22 +172,20 @@
 nst 
+%7B
 ext
+%7D
  = type
-.ext
 ;%0A%0A%09

use destructuring assignment