ls-chunk-store
abstract-chunk-store compliant
Browser localStorage chunk store that isFeatures
- Chunks that don't fit in localStorage remain in memory
- Works as a persistent cache of chunks
- Oldest ls-chunk-store chunks are removed when store is full
Install
npm install ls-chunk-store
You can also use the browserified version from jsDelivr:
Build
The following command will build ls-chunk-store.min.js in the dist folder
npm run-script build
The following command will build ls-chunk-store.js in the root folder
npm run-script build-dev
Usage
Generate random prefix
var LSChunkStore =var chunks = 10
Use specified prefix
var LSChunkStore =var chunks = 10prefix: 'myFile.txt'
put, get, close, destroy
chunks
License
MIT. Copyright (c) Diego Rodríguez Baquero.