Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chenjiahan/proom

cache script with localStorage
https://github.com/chenjiahan/proom

cache localstorage

Last synced: 19 days ago
JSON representation

cache script with localStorage

Awesome Lists containing this project

README

        

# proom
A tiny library to cache script with localStorage

### Usage
```HTML

```

### Demo
``` typescript
// 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);
}
```