Open slibby opened 6 years ago
would like someone (a real developer's!) feedback on that approach
👍
replace(' ','_')] = prop
if the (╯°□°)╯︵ ┻━┻) homage is intentional, extreme bonus points.
I would change that for:
props[propertyNames[i].trim().replace(/ /ig, "_")] = prop
This way you will replace all spaces and trim the string too ^_^
thanks @hhkaos, much better!
If the Google Sheet has column headings with spaces in them, the fields returned in the
/FeatureServer/0
request will includes spaces in the field name. This causes issues with Filter requests against the Feature Services.I can address this by changing https://github.com/koopjs/koop-provider-google-sheets/blob/master/sheets.js#L50 to
But would like someone (a real developer's!) feedback on that approach. I've tested it and it worked for me, maybe there is a more elegant way to do it.