A tiny function that tells you when the document is ready.
# yarn
yarn add @document/ready
# npm
npm install --save @document/ready
import ready from '@document/ready';
ready(() => {
console.log('🎉 Whoop whoop. The document is ready');
});
Create a dom ready listener.
A callback function which will be called when the document is ready.
Returns a dispose function. If you call it, the listener will be revoked.
MIT © Tobias Herber