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

name2avatar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

name2avatar

This package helps you generate a svg/png image buffer from the initials (extracted from name)

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

name-to-avatar

Description: This package helps you generate a svg/png image buffer from the initials (extracted from name).

Installation

npm i name2avatar

Usage

const name2avatar = require('name2avatar');
const options = {
    size: 200, // Image size in px
    bgColor: '#ffffff', // Background color
    color: '#000000', // Font color
    text: 'John Doe', // Full name
    isRounded: true, // want a circular radius?
    type: 'svg' // or 'png'
};
const imgBuffer = name2avatar.getImageBuffer(options);

// Optional
const  fs = require('fs');
fs.writeFileSync(`avatar.svg`, imgBuffer);

Keywords

FAQs

Package last updated on 17 Feb 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc