max-mapper / geojson-js-utils

JavaScript helper functions for manipulating GeoJSON
BSD 2-Clause "Simplified" License
402 stars 58 forks source link

Arguments validation #40

Open medikoo opened 7 years ago

medikoo commented 7 years ago

It'll be great if arguments of utils are validated, it will allow to have more meaningful errors e.g. instead of "Cannot read property '1' of undefined", util will crash with "Point object expected, received null"

@maxogden I will be happy to contribute such validation to the project (by introducing side ensurePoint etc. utils, and then making use of it in API).

Let me know what you think