import $ from 'domtastic';

export default function forEachElement(elements, callback) {
  const $components = $(elements);

  $components.forEach((component) => {
    const $component = $(component).first();

    callback($component);
  });
}
