diff options
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | src/util.ts | 8 | ||||
-rw-r--r-- | src/view/MapView.ts | 2 | ||||
-rw-r--r-- | yarn.lock | 7 |
4 files changed, 7 insertions, 14 deletions
diff --git a/package.json b/package.json index 1167f63..058fc3e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ }, "devDependencies": { "@types/gl-matrix": "^2.4.4", - "@types/lodash": "^4.14.117", "raw-loader": "^0.5.1", "ts-loader": "^5.2.2", "typescript": "^3.1.3", @@ -16,7 +15,6 @@ "webpack-dev-server": "^3.1.10" }, "dependencies": { - "gl-matrix": "^2.8.1", - "lodash": "^4.17.11" + "gl-matrix": "^2.8.1" } } 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'; @@ -7,11 +7,6 @@ resolved "https://registry.yarnpkg.com/@types/gl-matrix/-/gl-matrix-2.4.4.tgz#e9d06dc5552102eb6ced7beb78ceb3290b229959" integrity sha512-HyI/bS+CxFiewhtpuwUP9VftvPyImQulBuI9+VEUa5NnGILsuokliq2fFp9DqZsJHbGWxk/VOLwHaXb4vIkKBw== -"@types/lodash@^4.14.117": - version "4.14.117" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.117.tgz#695a7f514182771a1e0f4345d189052ee33c8778" - integrity sha512-xyf2m6tRbz8qQKcxYZa7PA4SllYcay+eh25DN3jmNYY6gSTL7Htc/bttVdkqj2wfJGbeWlQiX8pIyJpKU+tubw== - "@webassemblyjs/ast@1.7.8": version "1.7.8" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.8.tgz#f31f480debeef957f01b623f27eabc695fa4fe8f" @@ -1974,7 +1969,7 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash@^4.17.11, lodash@^4.17.5: +lodash@^4.17.5: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== |