summaryrefslogtreecommitdiffstats
path: root/src/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts8
1 files changed, 5 insertions, 3 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> {