New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@twaves/imagepreload

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twaves/imagepreload

image preload

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

install

  sudo npm install @twaves/imagepreload

Use

  import ImagePreload from '@twaves/imagepreload';

  ImagePreload({
    data: [
      {
        url: 'resource url include http or https',
        type: 'bg' // background tag
      },
      {
        url: 'resource url include http or https',
        type: 'img' // img tag
      }
    ],

    // Download resources with a few milliseconds delay, default: 0
    delay: 1000,

    // The minimum number of milliseconds to download resources
    minTime: 1000,

    // Download progress
    onProgress: (percent) => {
      console.log('percent', percent); // [0-100]
    },

    // Download completed
    onComplete: () => {
      console.log('complete'); // complete
    }
  })

Keywords

image

FAQs

Package last updated on 04 Feb 2021

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