Get rid of lodash
This commit is contained in:
parent
f9f3da7048
commit
23bee802a5
4 changed files with 8 additions and 15 deletions
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
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';
|
||||
|
|
|
@ -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==
|
||||
|
|
Reference in a new issue