question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docs incompatible with function namespaces

See original GitHub issue

As 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:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rowanwinscommented, Feb 27, 2017

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

1reaction
ThomasG77commented, Sep 17, 2016

Diagnostics

I would need a feedback on the current state I discovered for then contributing.

In the docs

… …

  • META
    • propEach (1) (turf-meta)
    • coordEach (1) (turf-meta)
    • coordReduce (1) (turf-meta)
    • featureEach (1) (turf-meta)
    • getCoord (1) (turf-invariant => wrong in the doc?)
  • ASSERTIONS
    • 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 and propReduce and coordAll in ASSERTIONS…

ASSERTIONS

  • bbox and tesselate are not related to turf-invariant but provide by the default turf build
  • circle has it own package
  • some assertions are in turf-meta, some other in turf-invariant => consistency choice?

In the code

Missing doc in official site (need confirmation):

  • turf-center-of-mass
  • turf-line-slice-along
  • turf-idw
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found