Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

char-to-avatar

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

char-to-avatar

Convert a character to avatar image in NodeJS

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

char-to-avatar

Convert a character to avatar image in NodeJS.

NPM version Build Status

Dependencies

Demo

Installation

npm install char-to-avatar

API

var CharToAvatar = require('char-to-avatar')

new CharToAvatar(character[, options])

  • character: {String}, a character to render.
  • options.color: {String}, character color, default to '#ffffff'.
  • options.backgroundColor: {String}, background color, default to '#383838'.
  • options.shape: {String}, 'square' or 'circle',avatar shape, default to 'square'.
  • options.size: {Number}, avatar size, default to 100.

CharToAvatar.prototype.pngStream()

Return a png image stream.

CharToAvatar.prototype.jpegStream([quality])

Return a jpeg stream.

  • quality: {Number}, 0 - 100, jpeg quality, default is 85.

CharToAvatar.prototype.toBuffer()

Return a thunk function that guarantee a png image buffer.

CharToAvatar.prototype.toDataURL([mime])

Return a thunk function that guarantee a image data string.

  • mime: {String}, mime type, default is 'image/png'.

Keywords

FAQs

Package last updated on 06 Jul 2015

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