Socket
Socket
Sign inDemoInstall

avatarholder

Package Overview
Dependencies
67
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    avatarholder

Library to generate automatic avatars


Version published
Maintainers
1
Created

Readme

Source

Avatar Holder

Avatar Holder is a library that generate automatic avatars, with name/username initials.

New Features!

  • Save image to file
  • Get initials from person full name

You can also:

  • Choose color from background
  • Save image to any extension you want

Demo

Incoming...

Installation

Install into your project

npm install avatarholder --save

Require avatarholder library

let avatarholder = require('avatarholder');

And start to generating your avatars...

let image = avatarholder.generateAvatar('Pedro Miguel Carmo');

or save into files...

let pathFile = avatarholder.avatarholder.generateAvatarToFile('Pedro Miguel Carmo', './my-avatar.png');

Options

Avatar Holder can receive options, always on last param.

let responseToFile = avatarholder.generateAvatarToFile(
    'Pedro Miguel Carmo',
    './my-avatar.jpg',
    {
        size: 600,
        bgColor: '#eee'
    }
);

Full options available (optional):

OptionsDefaultDescription
size100Image size in pixels
font40Font size in pixels
bgColor-Background color. Random color if not sent
color-Constrast with background color if not sent

Development

Want to contribute? Great!

Buy pedromcarmo a Coffe Image of Buy pedromcarmo a Coffe

Keywords

FAQs

Last updated on 05 Nov 2020

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