@k03mad/request 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,7 +105,7 @@ export const requestCache = (url, opts = {}, {cacheBy, expire = 43_200} = {}) =>
105
105
  const {cachedResponse, date} = cache.get(cacheKey);
106
106
 
107
107
  const measurement = 'seconds';
108
- const currentDiff = (Date.now() - date) * 1000;
108
+ const currentDiff = Math.round((Date.now() - date) / 1000);
109
109
 
110
110
  if (currentDiff < expire) {
111
111
  debug(`${green('FROM CACHE')} :: ${currentDiff}/${expire} ${measurement} left :: ${log}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/request",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Request library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"