Remove rest of the lodash iterators: map, reduce, forEach

(re: #6087)
This commit is contained in:
Bryan Housel
2019-03-29 15:14:21 -04:00
parent 0d79e3e616
commit d5abe468b9
14 changed files with 107 additions and 175 deletions
+3 -5
View File
@@ -1,5 +1,3 @@
import _map from 'lodash-es/map';
import { osmEntity } from './entity';
import { geoAngle, geoExtent } from '../geo';
import { utilArrayUniq } from '../util';
@@ -221,9 +219,9 @@ Object.assign(osmNode.prototype, {
'@lon': this.loc[0],
'@lat': this.loc[1],
'@version': (this.version || 0),
tag: _map(this.tags, function(v, k) {
return { keyAttributes: { k: k, v: v } };
})
tag: Object.keys(this.tags).map(function(k) {
return { keyAttributes: { k: k, v: this.tags[k] } };
}, this)
}
};
if (changeset_id) r.node['@changeset'] = changeset_id;