UNPKG

vanilla-lazyload

Version:

A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG

6 lines (5 loc) 105 B
export const callbackIfSet = function(callback, argument) { if (callback) { callback(argument); } };