identicons
v0.1.0
Published
Generate SVG identicons in node and the browser
Readme
identicons
Simple module to create SVG identicons like the ones used by GitHub.
Installing
npm install identicons --saveUsage
### SVG DOM
<div id="identicon"></div>var svg = identicons.generateSVGDOM('[email protected]', { width: 200, size: 5 })
document.getElementById('identicon').appendChild(svg)SVG Data URI
<img id="identicon">var src = identicons.generateSVGDataURIString('[email protected]', { width: 200, size: 5 })
document.getElementById('identicon').setAttribute('src', src)SVG String
<div id="identicon"></div>var svg = identicons.generateSVGString('[email protected]', { width: 200, size: 5 })
document.getElementById('identicon').innerHTML = svg