@req-json/etag
v1.0.3
Published
ETag middleware for req-json.
Downloads
3
Maintainers
Readme
@req-json/etag
ETag middleware for req-json.
Installation
NPM
npm install @req-json/etag --save
import ReqJSON from 'req-json';
import reqJSONETag from '@req-json/etag';
const reqJSON = new ReqJSON();
reqJSON.use(reqJSONETag());
Browser
Direct <script>
include window.reqJSONETag
<script src="https://cdn.jsdelivr.net/npm/@req-json/etag@1"></script>
Options
reqJSON.use(reqJSONETag({
storage: {
async getItem(id) {
// ...
},
async setItem(id, content) {
// ...
}
}
}));