Get rid of lodash

This commit is contained in:
Matthias Schiffer 2018-10-23 23:50:36 +02:00
parent f9f3da7048
commit 23bee802a5
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
4 changed files with 8 additions and 15 deletions

View file

@ -1,8 +1,10 @@
import * as _ from 'lodash';
export function mapFromObject<T>(obj: {[key: string]: T}): Map<string, T> {
return new Map(_.toPairs(obj));
let ret = new Map();
for (let k of Object.keys(obj))
ret.set(k, obj[k]);
return ret;
}
export function mapValues<K, V1, V2>(f: (v: V1) => V2, map: Map<K, V1>): Map<K, V2> {

View file

@ -1,5 +1,3 @@
import * as _ from 'lodash';
import {nextPowerOf2} from '../util';
import Renderer from './Renderer';