This question is not an exact duplicate, it is a "translation hub" for non-obvious questions:
About core version: this question is about "How to check at runtime", but there are good answer at this other question: "How to find the exact version of D3 given the minified file?".
About module version: "D3 is a collection of modules" (see official D3 API documentation), module is the correct term, but you can use this question: "How to find out about loaded d3.js extensions and their versions at runtime?".
There is a property like d3.version
for "core version"? or some "per module" property or method to check version? (imagining for example something like d3.csv.version
)
The API docs show nothing about it.
PS: supposing that it is stable and can be checked for example in embedded D3 like Plotly.d3
.
As of d3@>7.0.0
, the version number is no longer exposed. The last version that had it was d3@6.7.0
.
You're correct, you can figure out the version using d3.version
.
Just checked using console.log(d3)
to see all the methods and properties available, and version
was listed.
Here's a fiddle: https://jsfiddle.net/3e42bxom/2/