Javascript library for generating identicons. Running in the browser and on Node.js.
Improvements:
DOMContentLoaded
or window.onload
event to make the initial rendering more reliable (#54)Improvements:
jdenticon/browser
will ensure the browser bundle is used.jdenticon/node
will ensure the Node.js bundle is used.Improvement:
@type/node
(#45).Bug fixes:
Improvements:
Fixes in TypeScript typings:
"dom"
to "lib"
in tsconfig.json
.Breaking changes
jdenticon.js
or jdenticon.min.js
you donät have to do anything.drawIcon
is now 0.08 from the previous default 0. This was changed to remove code for backward compatibility, and to harmonize the API."jdenticon/standalone"
) still declares the interfaces in the global namespace.Changes
updateSvg()
and updateCanvas()
. These only contain references to the logics needed for each element type, providing better code optimization opportunities. They are now preferred over update()
where the element type is known.configure()
is a new method for providing a default style configuration. This plays nicer when imported as an ES module, than the old config
property, which was made read-only by the ES import statement.jdenticon.config
is deprecated. Use the global jdenticon_config
variable or jdenticon.configure()
method instead.Bug fixes
update()
method were incorrectly only accepting HTMLElement
. An <svg>
element (SVGSVGElement
) is not an HTMLElement
. Now Element
is accepted.update()
incorrectly rendered SVG data in any element with a tag name containing svg
, instead of being exactly svg
.Improvements:
padding
.padding
parameter of API methods has been replaced with a config
parameter. For backward compatibility a padding value is still allowed as value to the config
parameter.jdenticon.drawIcon
is now also available on Node for usage with canvas compatible packages.Bug fix:
Changes:
jdenticon_config.saturation
directly is now deprecated. Use jdenticon_config.saturation.color
instead.Improvements:
jdenticon_config
style options: saturation.color
, saturation.grayscale
and hues
.jdenticon_config
option replaceMode
which has the following values:
Bug fixes:
Breaking changes:
Improvements:
toPng
function when running on Node.js. Benchmarks have shown performance boosts up to 50%.backColor
for configuring background color of generated icons.padding
parameter to the drawIcon
method.