Awesome
identicons
Simple module to create SVG identicons like the ones used by GitHub.
Installing
npm install identicons --save
Usage
### SVG DOM
<div id="identicon"></div>
var svg = identicons.generateSVGDOM('username@example.com', { width: 200, size: 5 })
document.getElementById('identicon').appendChild(svg)
SVG Data URI
<img id="identicon">
var src = identicons.generateSVGDataURIString('username@example.com', { width: 200, size: 5 })
document.getElementById('identicon').setAttribute('src', src)
SVG String
<div id="identicon"></div>
var svg = identicons.generateSVGString('username@example.com', { width: 200, size: 5 })
document.getElementById('identicon').innerHTML = svg