Skip to content

Commit

Permalink
var => const
Browse files Browse the repository at this point in the history
  • Loading branch information
Olaf Kwant committed Sep 21, 2018
1 parent 88f6a5c commit cc4d11f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/client_v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default class ClientV2 extends Client {
throw new Error('Type for get not supported, get expects String or Array of Strings')
}

return Client.prototype.get.call(this, stringOrArray).then((data) => {
var error, str, arr
return super.get(stringOrArray).then((data) => {
let error, str, arr

if (typeof stringOrArray === 'string') {
str = stringOrArray
Expand Down Expand Up @@ -58,11 +58,11 @@ export default class ClientV2 extends Client {
}

request (obj) {
var cached = !!obj.cachable
const isCached = !!obj.cachable
delete obj.cachable
var cacheName = tools.unqiue(obj)
const cacheName = tools.unqiue(obj)

if (cached) return tools.cache(cacheName) || tools.cache(cacheName, super.request(obj))
if (isCached) return tools.cache(cacheName) || tools.cache(cacheName, super.request(obj))
else return super.request(obj)
}
}
1 change: 1 addition & 0 deletions spec/client_v2_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* globals assert */
import ClientV2, { tools } from '../lib/client_v2'
import sinon from 'sinon'

Expand Down

0 comments on commit cc4d11f

Please sign in to comment.