@document/ready
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @document/ready

Weekly Downloads

10

Version

1.1.0

License

MIT

Unpacked Size

8.21 kB

Total Files

15

Last publish

Collaborators

  • tobihrbr