summaryrefslogtreecommitdiffstats
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
parentf9f3da7048880cb3c4b03d0116bb8be850688e74 (diff)
downloadrpgedit-23bee802a5bba0e9a7bd2775fb31bf0af29ba1e7.tar
rpgedit-23bee802a5bba0e9a7bd2775fb31bf0af29ba1e7.zip
Get rid of lodash
-rw-r--r--package.json4
-rw-r--r--src/util.ts8
-rw-r--r--src/view/MapView.ts2
-rw-r--r--yarn.lock7
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';
diff --git a/yarn.lock b/yarn.lock
index 00975eb..ab2cbf5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -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==