summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-10-23 23:50:36 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-10-23 23:50:36 +0200
commit23bee802a5bba0e9a7bd2775fb31bf0af29ba1e7 (patch)
tree7ea3b5cfcacf7428b7c96fc6f8ec300beaa2d202 /src
parentf9f3da7048880cb3c4b03d0116bb8be850688e74 (diff)
downloadrpgedit-23bee802a5bba0e9a7bd2775fb31bf0af29ba1e7.tar
rpgedit-23bee802a5bba0e9a7bd2775fb31bf0af29ba1e7.zip
Get rid of lodash
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';