Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/chenjiahan/proom
- Owner: chenjiahan
- Created: 2016-11-01T11:16:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-24T02:21:08.000Z (over 7 years ago)
- Last Synced: 2024-10-19T19:45:50.383Z (3 months ago)
- Topics: cache, localstorage
- Language: TypeScript
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
}
```