summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.ts8
-rw-r--r--src/view/MapView.ts2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/util.ts b/src/util.ts
index 337bf05..73788ad 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1,8 +1,10 @@
-import * as _ from 'lodash';
+export function mapFromObject<T>(obj: {[key: string]: T}): Map<string, T> {
+ let ret = new Map();
+ for (let k of Object.keys(obj))
+ ret.set(k, obj[k]);
-export function mapFromObject<T>(obj: {[key: string]: T}): Map<string, T> {
- return new Map(_.toPairs(obj));
+ return ret;
}
export function mapValues<K, V1, V2>(f: (v: V1) => V2, map: Map<K, V1>): Map<K, V2> {
diff --git a/src/view/MapView.ts b/src/view/MapView.ts
index 61b8336..21f83d5 100644
--- a/src/view/MapView.ts
+++ b/src/view/MapView.ts
@@ -1,5 +1,3 @@
-import * as _ from 'lodash';
-
import {nextPowerOf2} from '../util';
import Renderer from './Renderer';