d3-icon
This (very simple) D3.js module shall help to include common icons in your documents.
Installing
If you use NPM, npm install d3-icon
. Otherwise, download the latest release.
Usage
To draw a heart, use the following code fragment:
var heartIcon = d3.icon({type: 'heart'});
To see in detail, how it works, have a look at the example.html. Run "npm run prepublish" to create the build folder used there.
Credits
Usefull stuff taken from D3 shape module.