Package Exports
- d3plus-common
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (d3plus-common) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
d3plus-common
A starter environment for D3plus modules.
Installation Options
NPM
npm install d3plus-commonBrowser
In a vanilla environment, a d3plus_common global is exported. To use a compiled version hosted on d3plus.org that includes all dependencies:
<script src="https://d3plus.org/js/d3plus-common.v0.1.min.js"></script>Otherwise, click here to download the latest release.
AMD and CommonJS
The released bundle natively supports both AMD and CommonJS, and vanilla environments.
Custom Builds
The source code is written using standard import and export statements. Create a custom build using Rollup or your preferred bundler. Take a look at the index.js file to see the modules exported.
API Reference
constant(value)
Wraps non-function variables in a simple return function.
Kind: global function
| Param | Type | Description |
|---|---|---|
| value | Array | Number | Object | String |
The value to be returned from the function. |
Example (this)
constant(42);
Example (returns this)
function() {
return 42;
}