|
|
|
|
|
by morganherlocker
4294 days ago
|
|
You can have both. Frameworks like turf (a geospatial analysis library that I authored) have one high level convenience module[1]. You can require('turf'), then run any function from a single object (ie: turf.buffer(), turf.smooth(), etc.). Finer control is often required, however, for all sorts of reasons. For these cases, turf is made up of a collection of sub-modules [2][3], and these can be required individually. I like this approach, since it provides a nice curated framework for users simply wanting to get stuff done quickly, but it also allows for more tuned usage in production environments. It has been a bit more work to maintain (~70 repos, instead of 1), but I have been pleased with the approach so far. [1] https://github.com/Turfjs/turf
[2] https://github.com/Turfjs/turf-buffer
[3] https://github.com/Turfjs/turf-smooth |
|