Add browser-polyfills, remove lodash assign, compact, values

(re: #6087)
This commit is contained in:
Bryan Housel
2019-03-22 17:14:41 -04:00
parent 547267d7b6
commit 11bfeaabfc
21 changed files with 65 additions and 132 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import _difference from 'lodash-es/difference';
import _each from 'lodash-es/each';
import _isEqual from 'lodash-es/isEqual';
import _values from 'lodash-es/values';
/*
@@ -167,7 +166,7 @@ export function coreDifference(base, head) {
}
}
return _values(relevant);
return Object.values(relevant);
};
+3 -4
View File
@@ -1,4 +1,3 @@
import _assign from 'lodash-es/assign';
import _difference from 'lodash-es/difference';
import _includes from 'lodash-es/includes';
import _without from 'lodash-es/without';
@@ -12,9 +11,9 @@ export function coreGraph(other, mutable) {
if (other instanceof coreGraph) {
var base = other.base();
this.entities = _assign(Object.create(base.entities), other.entities);
this._parentWays = _assign(Object.create(base.parentWays), other._parentWays);
this._parentRels = _assign(Object.create(base.parentRels), other._parentRels);
this.entities = Object.assign(Object.create(base.entities), other.entities);
this._parentWays = Object.assign(Object.create(base.parentWays), other._parentWays);
this._parentRels = Object.assign(Object.create(base.parentRels), other._parentRels);
} else {
this.entities = Object.create({});
+3 -8
View File
@@ -10,7 +10,6 @@ import _forEach from 'lodash-es/forEach';
import _map from 'lodash-es/map';
import _omit from 'lodash-es/omit';
import _reject from 'lodash-es/reject';
import _values from 'lodash-es/values';
import _without from 'lodash-es/without';
import _uniq from 'lodash-es/uniq';
@@ -23,11 +22,7 @@ import { coreGraph } from './graph';
import { coreTree } from './tree';
import { osmEntity } from '../osm/entity';
import { uiLoading } from '../ui';
import {
utilRebind,
utilSessionMutex
} from '../util';
import { utilRebind, utilSessionMutex } from '../util';
export function coreHistory(context) {
@@ -472,8 +467,8 @@ export function coreHistory(context) {
return JSON.stringify({
version: 3,
entities: _values(allEntities),
baseEntities: _values(baseEntities),
entities: Object.values(allEntities),
baseEntities: Object.values(baseEntities),
stack: s,
nextIDs: osmEntity.id.next,
index: _index