Socket
Socket
Sign inDemoInstall

gixi

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gixi

Github identicons like images generator


Version published
Weekly downloads
148
decreased by-9.76%
Maintainers
1
Install size
11.5 kB
Created
Weekly downloads
 

Readme

Source

GIXI

HTML5 canvas based GitHub identicons like pixel/avatar images generator library. Available as jquery plugin, es6 or vanillaJS.


Using jQuery library demo
VanillaJS demo

CodePen live demo

Installation

Installation via npm

npm install gixi

Installation via bower

bower install gixi

Using CDN

<script src="https://npmcdn.com/gixi@0.0.1/dist/gixi-min.js"></script>

Or download it from current release gixi-min.js 2.96Kb

Usage

Make identicons using jQuery

  • Download and install gixi-min.js library
  • Use following code to invoke gixification of your dom elements
  $('.avatar-element').gixi();

  // or using custom colors

  var color = "#000";
  $('.avatar-element').gixi(color);

Make identicons without jQuery

  • Download and install gixi-min.js library
  • Use following code to invoke gixification of your dom elements
 /*
  *  Generate gixi image for size of 300
  */

  var imageSize = 300;
  var imageData = new GIXI(imageSize).getImage();

  /*
   *  Then place it to your dom element
   */

  var element = document.getElementById('gixie');

  element.setAttribute('src', imageData);

License

Copyright (c) 2016 Svetlana Linuxenko

FAQs

Last updated on 12 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc