Properties

Methods

Troubleshooting

Renders an indenticon as a SVG string. The response can either be used in the DOM or saved as a file with the *.svg extension. This method does not have any dependencies to the DOM and can be used to generate icons server-side e.g. by using Node.js.

jdenticon.toSvg(hash|value, size[, padding])

Compability

Browser: YesNode.js: Yes

Examples

In the following example an identicon is rendered as an svg string that is inserted into the page.