aboutsummaryrefslogtreecommitdiff
path: root/src/content/usecases/HintKeyProducer.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 11:10:36 +0900
committerGitHub <noreply@github.com>2019-12-22 11:10:36 +0900
commitb1a6f374dca078dee2406ebe049715b826e37ca2 (patch)
tree5367c48648e2018f55f12d847baba94559e10040 /src/content/usecases/HintKeyProducer.ts
parentb2dcdedad729ff7087867da50e20578f9fc8fb29 (diff)
parentda72c2ddd916d79d134662e3985b53a4ac78af7a (diff)
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'src/content/usecases/HintKeyProducer.ts')
-rw-r--r--src/content/usecases/HintKeyProducer.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content/usecases/HintKeyProducer.ts b/src/content/usecases/HintKeyProducer.ts
index 241cd56..68f3fbd 100644
--- a/src/content/usecases/HintKeyProducer.ts
+++ b/src/content/usecases/HintKeyProducer.ts
@@ -19,14 +19,14 @@ export default class HintKeyProducer {
}
private increment(): void {
- let max = this.charset.length - 1;
+ const max = this.charset.length - 1;
if (this.counter.every(x => x === max)) {
this.counter = new Array(this.counter.length + 1).fill(0);
return;
}
this.counter.reverse();
- let len = this.charset.length;
+ const len = this.charset.length;
let num = this.counter.reduce((x, y, index) => x + y * len ** index) + 1;
for (let i = 0; i < this.counter.length; ++i) {
this.counter[i] = num % len;