Get rid of lodash
This commit is contained in:
parent
f9f3da7048
commit
23bee802a5
4 changed files with 8 additions and 15 deletions
10
src/util.ts
10
src/util.ts
|
@ -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> {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import * as _ from 'lodash';
|
||||
|
||||
import {nextPowerOf2} from '../util';
|
||||
|
||||
import Renderer from './Renderer';
|
||||
|
|
Reference in a new issue