Skip to content

Commit

Permalink
Merge pull request #88 from l0n3star/master
Browse files Browse the repository at this point in the history
Fix issue 87
  • Loading branch information
petteripitkanen authored Aug 25, 2019
2 parents 2757466 + f7232cd commit 33972dc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions db/practicalplants.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ function readCrops() {
replaceValue(object, property, ['Yes', 'True'], 'true');
});

for (const property of NAME_PROPERTIES) {
if (object[property]) {
if (/[a-z]/.test(object[property][0])) {
console.error(JSON.stringify(object), '\n');
replaceValue(
object,
property,
[object[property]],
object[property][0].toUpperCase() + object[property].slice(1)
);
}
}
}

replaceValue(object, 'matureMeasurementUnit', ['metres'], 'meters');

replaceArrayValue(object['pollinators'], ['bees. self'], ['bees', 'self']);
Expand Down

0 comments on commit 33972dc

Please sign in to comment.