UNPKG

glitch-canvas

Version:

JavaScript library for applying a glitch effect to a canvas element

11 lines (10 loc) 256 B
export default function (imageData) { return ( imageData && typeof imageData.width === 'number' && typeof imageData.height === 'number' && imageData.data && typeof imageData.data.length === 'number' && typeof imageData.data === 'object' ); }