New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generate-avatar

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-avatar - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"name": "generate-avatar",
"version": "1.4.0",
"version": "1.4.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,7 +0,11 @@

<p align="center">
<img src="logo.png">
<div align="center">
<img src="logo.png" alt="generate-avatar" />
</div>
<p>
<div align="center">
👆 The logo is: `generateFromString('generateavatar')`
</div>
<br/>
</p>
👆 The logo is: `generateFromString('generateavatar')`
[![License](https://img.shields.io/npm/l/generate-avatar.svg?style=flat-square)](http://opensource.org/licenses/MIT)

@@ -14,18 +18,25 @@ ![Version](https://img.shields.io/npm/v/generate-avatar.svg?style=flat-square)

# Generate Avatar
# Why use Generate Avatar?
Your lightweight avatar generator, which 100% fingerprinted on any input you want.
A lightweight and blazing fast avatar generator, which is 100% fingerprinted and unique on any input you want.
You can pass your email, uuid, username etc. as an input and it will generate everytime the same unique svg based avatar for you.
Which means you don't need to store any image in your database anymore.
It generates that image on the fly whereever you want based on the id, email and so on.
Pass in your email, uuid, username etc. as an input and it will generate everytime the same unique svg based avatar for you.
The best thing it's only **5kB** big, so it can be basically used everywhere you want.
Which means you don't have to store any generated images in your database anymore.
It generates those images on the fly whereever you want based on the id, email and so on.
The best thing it's only **5 kB** small, so it can be basically used everywhere you want.
### Install
```
npm i generate-avatar
yarn add generate-avatar
```
or
```
npm install generate-avatar
```
### How it works

@@ -41,6 +52,12 @@

This will generate the following svg image.
This will generate the svg in a string format. In order to use it, you can use the [image data src attribute](https://css-tricks.com/lodge/svg/09-svg-data-uris/) like this:
```
<img src={`data:image/svg+xml;utf8,${generateFromString("example@test.com")}`} />
```
This will generate and display the following svg image.
![](example.png)
You can [try it out here](https://generate-avatar.now.sh/). Try to pass in `example@test.com` and you will see the exact same image.
[Try it out here](https://generate-avatar.now.sh/?str=example@test.com) and download the image. You will see that it generates the exact same image everytime. Isn't that amazing ?

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc