Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

domreadify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domreadify

Browserify transform to execute the script only on DOM ready

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

domreadify

A browserify transform to execute the script only on DOM ready.

If you have global dependencies that would be available only after loading the whole page, the domreadify transform will allow to postpone export execution by executing the whole script on DOM ready event.

Installation

Install with npm:

npm install domreadify --save-dev

Install with yarn:

yarn add domreadify --dev

The package has no configurations.

Usage

Command line argument:

browserify src.js -o output.js --transform domreadify

or you can add the transform to your package.json:

{
  "browserify": {
    "transform": ["domreadify"]
  }
}
browserify src.js -o output.js

See also

browserify-global-shim - a browserify transform for replacing modules with global variables. You probably will want to use browserify-global-shim and domreadify together: first replace modules with global variables, then postpone the script execution to DOM ready (when all global variables are available).

License

Copyright (c) 2019 Yuri Sitnikov. Licensed under the MIT license.

FAQs

Package last updated on 30 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc