We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9893810 commit 2b8c720Copy full SHA for 2b8c720
src/simple-map.js
@@ -1,20 +1,19 @@
1
export default class SimpleMap {
2
- constructor() {
+ constructor () {
3
this.keys = [];
4
this.values = [];
5
}
6
7
- get(key) {
+ get (key) {
8
const index = this.keys.indexOf(key);
9
- if (index === -1) {
10
- return;
11
- }
+
12
return this.values[index];
13
14
-
15
- set(key, value) {
+ set (key, value) {
16
this.keys.push(key);
17
this.values.push(value);
18
return value;
19
20
-}
+}
0 commit comments