1.1.0 • Published 3 years ago

@document/ready v1.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

Document Ready

Tiny function that tells you when the document is ready.

Install

# yarn
yarn add @document/ready

# npm
npm install --save @document/ready

Usage

import ready from '@document/ready';

ready(() => {
  console.log('🎉 Whoop whoop. The document is ready');
});

API

ready(cb)

Create a dom ready listener.

cb: () => void

A callback function which will be called when the document is ready.

Returns

Returns a dispose function. If you call it, the listener will be revoked.

License

MIT © Tobias Herber

Made by Varld