Gist 4d1e447f82a7d2b425c4d1a3f5489e7a
A minimal example defines a custom `d3.foo()` method on the D3 namespace and calls it inside a page’s `console.log`, with the page loading the external script `d3-foo.js` that presumably defines this function. The rendered output is the return value of that method, shown only in the browser’s console. The code uses the standard D3 library, imported via a `<script>` tag, and demonstrates a simple extension pattern for library APIs. No data source, canvas, or SVG rendering is present; the example focuses solely on API invocation and console output.