A First Meaningful Paint metric collector based on MutationObserver with a setTimeout fallback
npm i -S painty
import painty from 'painty';
painty(fmp => console.log(fmp));
optionally you can specify a timeout or by default painty will try to detect FMP until page unload
painty(5000, fmp => console.log(fmp));