Skip to content

Commit 99c0119

Browse files
committed
Use es6 syntactical sugar
1 parent 4322309 commit 99c0119

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/gitlabcache.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ export class GitlabCache {
1111
private ttl: number;
1212
private storage: NodeCache;
1313

14-
public static get DEFAULT_TTL() {
15-
return 300;
16-
}
14+
public static readonly DEFAULT_TTL = 300;
1715

1816
private static _generateKeyHash(username: string, password: string) {
1917
const sha = Crypto.createHash('sha256');
20-
sha.update(JSON.stringify({ username: username, password: password }));
18+
sha.update(JSON.stringify({ username, password }));
2119
return sha.digest('hex');
2220
}
2321

0 commit comments

Comments
 (0)