1.0.7 • Published 2 years ago

name2avatar v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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);
1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago