Jdenticon Versions Save

Javascript library for generating identicons. Running in the browser and on Node.js.

3.3.0

1 week ago

Improvements:

  • Moved automatic rendering to DOMContentLoaded or window.onload event to make the initial rendering more reliable (#54)

3.2.0

1 year ago

Improvements:

  • Support for using Jdenticon from TypeScript with module resolution set to Node16.
  • New exports for explicitly picking a bundle:
    • Importing jdenticon/browser will ensure the browser bundle is used.
    • Importing jdenticon/node will ensure the Node.js bundle is used.

3.1.1

2 years ago

Improvement:

  • Fixed type error when using Jdenticon with v16 of @type/node (#45).

3.1.0

3 years ago

Bug fixes:

  • Webpack 5 was always picking node implementation. #39

Improvements:

  • Slightly smaller builds due to replacement of minifier (Terser is now being used).

3.0.1

3 years ago

Fixes in TypeScript typings:

  • Allow using the Jdenticon package without adding "dom" to "lib" in tsconfig.json.
  • Node typings do no longer leak from the Jdenticon package.

3.0.0

3 years ago

Breaking changes

  • The exported file for bundlers does no longer automatically render icons at startup. You need to call any of the update methods from your code to render icons. You can also choose to import "jdenticon/standalone" instead of "jdenticon" to keep the old behavior. If you are importing jdenticon.js or jdenticon.min.js you donät have to do anything.
  • The default padding of drawIcon is now 0.08 from the previous default 0. This was changed to remove code for backward compatibility, and to harmonize the API.
  • TypeScript: Jdenticon interfaces must be imported when using the Jdenticon module bundle. The interfaces are no longer declared in the global namespace. The UMD bundle (used when importing "jdenticon/standalone") still declares the interfaces in the global namespace.

Changes

  • New methods 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.
  • An ES bundle is now provided. Just import the "jdenticon" package and the bundler will choose the ES bundle when possible. This will improve code optimizations hopefully causing smaller builds.
  • 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

  • The typings of the 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.

2.2.0

4 years ago

Improvements:

  • TypeScript typings are now bundled in NPM package.
  • New configuration property padding.
  • The 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.
  • Added CLI tool.
  • jdenticon.drawIcon is now also available on Node for usage with canvas compatible packages.
  • Updated universal module definition.

2.1.1

5 years ago

Bug fix:

  • An exception was thrown when generating large PNG icons on Node 10.x.

2.1.0

6 years ago

Changes:

  • Setting jdenticon_config.saturation directly is now deprecated. Use jdenticon_config.saturation.color instead.

Improvements:

  • New jdenticon_config style options: saturation.color, saturation.grayscale and hues.
  • New jdenticon_config option replaceMode which has the following values:
    • "once" - icons are replaced once upon page load. This is the default value and how Jdenticon has always behaved.
    • "never" - no icons are replaced automatically. Good for folks who have written their own components for triggering icon updates.
    • "observe" - icons are replaced upon page load, and the DOM is then monitored for new identicons. This mode is useful in applications where new icons are inserted dynamically into the page, e.g. by using React or Angular.
  • Source maps are now provided for jdenticon.min.js.

Bug fixes:

  • No icon was rendered when a falsy value was passed to jdenticon.update.
  • Smaller circles were rendered very badly to PNG in smaller sizes (changes in the dependency canvas-renderer).
  • Padding is now rounded instead of truncated to nearest integer to avoid floating point rounding errors.

2.0.0

6 years ago

Breaking changes:

  • Now licensed under the MIT license. This change was done to simplify using Jdenticon in businesses utilizing list of allowed open source licenses.

Improvements:

  • Improved performance for the toPng function when running on Node.js. Benchmarks have shown performance boosts up to 50%.
  • New option backColor for configuring background color of generated icons.
  • Added padding parameter to the drawIcon method.