From 23bee802a5bba0e9a7bd2775fb31bf0af29ba1e7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 23 Oct 2018 23:50:36 +0200 Subject: Get rid of lodash --- src/util.ts | 8 +++++--- src/view/MapView.ts | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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(obj: {[key: string]: T}): Map { + let ret = new Map(); + for (let k of Object.keys(obj)) + ret.set(k, obj[k]); -export function mapFromObject(obj: {[key: string]: T}): Map { - return new Map(_.toPairs(obj)); + return ret; } export function mapValues(f: (v: V1) => V2, map: Map): Map { 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'; -- cgit v1.2.3