0.2.2 • Published 8 years ago

potato-avatars v0.2.2

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

potato-avatars

What is it?

What are avatars?

Avatars are earthly creatures... whatever

Took the avatars engine from 'adorable-avatars' and made it a reusable module

How do I use it?

var avatars = require("potato-avatars").middleware;
var app = require("express")();
app.use("/avatars/:size?/:id", avatars());

Avatars will be available at /avatars/200/some-user-identifier.png

options

options.requestId 'params.id'

Request path notation property for user identifier (.png extension will be stripped)

options.requestSize 'params.size'

Request path notation property for avatar size

options.assets 'assets/'

Path to assers dir (eyes, mouth, nose)

options.maxSize (400)

Max size for avatars

options.minSize (40)

Min size for avatars

options.colors '#ffffff'

Pallete for background colors (hex)

Open-source Contributors

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

9 years ago