Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Any way to specify expected geojson object type? #27

Closed
sckott opened this issue May 12, 2015 · 2 comments
Closed

Any way to specify expected geojson object type? #27

sckott opened this issue May 12, 2015 · 2 comments

Comments

@sckott
Copy link
Contributor

sckott commented May 12, 2015

E.g.,

geojsonhint.hint(<object>, expected = "point")

Would be nice to be able to not only know if the geojson passes the linter, but if the object passed in is actually a Point if you expect it to be - Perhaps this is out of scope.

@tmcw
Copy link
Contributor

tmcw commented Jul 14, 2015

This is equivalent to

!geojsonhint.hint(<object>).length && <object>.type === 'Point';

Which I think is more clear

@tmcw tmcw closed this as completed Jul 14, 2015
@sckott
Copy link
Contributor Author

sckott commented Jul 19, 2015

@tmcw thanks, makes sense

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants