docs incompatible with function namespaces
See original GitHub issueAs a new user it is totally unclear, which functions are available in the main turf
package, and which functions need to be separately loaded in external packages:
After some lengthy experiments it seems to me, that all functions listed in the docs are included in turf
, except for the ones in section Meta. These can be called on the package turf-meta
.
Except for turfMeta.getCoord()
which is nonexistent in the code it seems. instead the function turfMeta.coordAll()
is available, but listed under Assertions in the docs…?!
So there is definitely some clarification needed:
- what functions can be used by default
- what functions need to be loaded separately
- from which package
- a list of external packages
- a best practice to add functions from external packages to the turf namespace
edit: I’m using the latest npm packages turf@3.0.6
and turf-meta@3.0.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Multi-level namespace creates incompatible grpc bindings in ...
This past week, I found an issue with the go grpc generator while using a multi-level namespace. So, for example, if we edit...
Read more >C2653/C2039 error when you reference STD functions
Attempting to reference a function from the STD C++ library header <cstdlib> using the namespace std (for example, std::exit(0) ) causes the ...
Read more >Using a function as Callback of another one declared with ...
It uses namespaces for function declarations. I have a function (my_function_comments) in my lib/extras.php file to modify the comments markup.
Read more >Working with namespaces - Amazon Redshift
In Amazon Redshift Serverless, a namespace defines a logical container for database objects. It can hold tables, workgroups, and other database resources.
Read more >Namespaces - Apache FreeMarker Manual
When you run templates, you have a (possibly empty) set of variables that you have created with assign and macro and function directives ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe this could now be marked as closed given the recent updates to the docs, I hope they are much clearer in this regard. cc @DenisCarriere
Diagnostics
I would need a feedback on the current state I discovered for then contributing.
In the docs
… …
propEach
(1) (turf-meta)coordEach
(1) (turf-meta)coordReduce
(1) (turf-meta)featureEach
(1) (turf-meta)getCoord
(1) (turf-invariant => wrong in the doc?)featureOf
(1) (turf-invariant)collectionOf
(1) (turf-invariant)bbox
circle
(1) (turf-circle => wrong in the doc?)geojsonType
(1) (turf-invariant)propReduce
(1) (turf-meta => wrong in the doc?)coordAll
(1) (turf-meta => wrong in the doc?)tesselate
(1) Not in default turf.min.js
Conclusion:
META
Quite consistent except for
getCoord
in turf-invariant andpropReduce
andcoordAll
in ASSERTIONS…ASSERTIONS
bbox
andtesselate
are not related to turf-invariant but provide by the default turf buildcircle
has it own packageIn the code
Missing doc in official site (need confirmation):