1.1.1 • Published 6 years ago

async-load-dependencies v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

async load dependencies before excuting main function

USAGE

  import asyncLoad from 'async-load-dependencies'
  const urls = [
    '/path/to/a.js',
    '/path/to/b.js',
    {
      src: '/path/to/c.js',
      charset: 'GBK'
    }, 
    {
      src: '/path/to/fetch-polyfill',
      skipWhenSupports() {
        return window.fetch  // skip this file when fetch is supported
      }
    }
  ]
  function main () {
    // your business
  }
  asyncLoad(urls, main)
1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago