aboutsummaryrefslogtreecommitdiff
path: root/src/content/hint-key-producer.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-17 09:00:41 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-17 09:00:41 +0900
commitcd4708898134f5966f87df4aeaa8ed8c60e7943f (patch)
treedb082d9cb2ec426010556dbc24ab439c9757afbd /src/content/hint-key-producer.js
parentc5529958d53146c8c6826673abe6431a19f1924d (diff)
parent9ae814dfe45426f8df9b89b305392770344a7d50 (diff)
Merge branch 'lint'
Diffstat (limited to 'src/content/hint-key-producer.js')
-rw-r--r--src/content/hint-key-producer.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/hint-key-producer.js b/src/content/hint-key-producer.js
index 8064afb..14b23b6 100644
--- a/src/content/hint-key-producer.js
+++ b/src/content/hint-key-producer.js
@@ -11,19 +11,19 @@ export default class HintKeyProducer {
produce() {
this.increment();
- return this.counter.map((x) => this.charset[x]).join('');
+ return this.counter.map(x => this.charset[x]).join('');
}
increment() {
let max = this.charset.length - 1;
- if (this.counter.every((x) => x == max)) {
+ 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;
- let num = this.counter.reduce((x,y,index) => x + y * (len ** index)) + 1;
+ 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;
num = ~~(num / len);