auto-fix eslint warnings
This commit is contained in:
parent
5b692cef4b
commit
e6efe02905
2
index.js
2
index.js
@ -10,7 +10,7 @@ function md5(str) {
|
|||||||
async function getResponse(cacheDirPath, requestArguments, bodyFunctionName) {
|
async function getResponse(cacheDirPath, requestArguments, bodyFunctionName) {
|
||||||
const [url, requestInit, ...rest] = requestArguments;
|
const [url, requestInit, ...rest] = requestArguments;
|
||||||
const requestParams = requestInit.body
|
const requestParams = requestInit.body
|
||||||
? Object.assign({}, requestInit, {body: typeof requestInit.body === 'object' ? requestInit.body.toString() : requestInit.body})
|
? ({ ...requestInit, body: typeof requestInit.body === 'object' ? requestInit.body.toString() : requestInit.body })
|
||||||
: requestInit;
|
: requestInit;
|
||||||
|
|
||||||
const cacheHash = md5(JSON.stringify([url, requestParams, ...rest]) + bodyFunctionName);
|
const cacheHash = md5(JSON.stringify([url, requestParams, ...rest]) + bodyFunctionName);
|
||||||
|
Reference in New Issue
Block a user