Merge branch 'keep-right_QA'

This commit is contained in:
Bryan Housel
2019-01-04 21:37:19 -05:00
47 changed files with 2735 additions and 183 deletions
+1 -1
View File
@@ -4,6 +4,7 @@ export { utilCleanTags } from './clean_tags';
export { utilDisplayName } from './util';
export { utilDisplayNameForPath } from './util';
export { utilDisplayType } from './util';
export { utilEntityRoot } from './util';
export { utilEditDistance } from './util';
export { utilEntitySelector } from './util';
export { utilEntityOrMemberSelector } from './util';
@@ -27,7 +28,6 @@ export { utilRebind } from './rebind';
export { utilSetTransform } from './util';
export { utilSessionMutex } from './session_mutex';
export { utilStringQs } from './util';
// export { utilSuggestNames } from './suggest_names';
export { utilTagText } from './util';
export { utilTiler } from './tiler';
export { utilTriggerEvent } from './trigger_event';
+3 -1
View File
@@ -42,7 +42,9 @@ export function t(s, o, loc) {
if (rep !== undefined) {
if (o) {
for (var k in o) {
rep = rep.replace('{' + k + '}', o[k]);
var variable = '{' + k + '}';
var re = new RegExp(variable, 'g'); // check globally for variables
rep = rep.replace(re, o[k]);
}
}
return rep;
+9
View File
@@ -121,6 +121,15 @@ export function utilDisplayType(id) {
}
export function utilEntityRoot(entityType) {
return {
node: 'n',
way: 'w',
relation: 'r'
}[entityType];
}
export function utilStringQs(str) {
return str.split('&').reduce(function(obj, pair){
var parts = pair.split('=');