1.2.1 • Published 7 years ago

proom v1.2.1

Weekly downloads
7
License
ISC
Repository
github
Last release
7 years ago

proom

A tiny library to cache script with localStorage

Usage

<script src="proom.js"></script>

Demo

// single file
proom.init({
    prefix: 'project_',
    version: '1.0.0'
}).load({
    index: {
        url: './index.js'
    }
})

// multi files
// load vendor before index
proom.init({
    prefix: 'project_',
    version: '1.0.1'
}).load({
    vendor: {
        url: './vendor.js',
        onLoad: onLoad
    },
    index: {
        url: './index.js',
        onLoad: onLoad
    }
})

var onLoad = function () {
    var files = ['vendor', 'index'];
    proom.has(files) && proom.inject(files);
}
1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.0

8 years ago