Skip to content

Commit cc4d11f

Browse files
author
Olaf Kwant
committed
var => const
1 parent 88f6a5c commit cc4d11f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/client_v2.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export default class ClientV2 extends Client {
2525
throw new Error('Type for get not supported, get expects String or Array of Strings')
2626
}
2727

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

3131
if (typeof stringOrArray === 'string') {
3232
str = stringOrArray
@@ -58,11 +58,11 @@ export default class ClientV2 extends Client {
5858
}
5959

6060
request (obj) {
61-
var cached = !!obj.cachable
61+
const isCached = !!obj.cachable
6262
delete obj.cachable
63-
var cacheName = tools.unqiue(obj)
63+
const cacheName = tools.unqiue(obj)
6464

65-
if (cached) return tools.cache(cacheName) || tools.cache(cacheName, super.request(obj))
65+
if (isCached) return tools.cache(cacheName) || tools.cache(cacheName, super.request(obj))
6666
else return super.request(obj)
6767
}
6868
}

spec/client_v2_spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-env mocha */
2+
/* globals assert */
23
import ClientV2, { tools } from '../lib/client_v2'
34
import sinon from 'sinon'
45

0 commit comments

Comments
 (0)