libravatar

3.0.0 • Public • Published

node-libravatar

A library intended for integrating with the federated Libravatar avatar hosting service from within your Node.js applications. The project was inspired by a Gravatar library from Emerson Macedo.

See the project page for the issue tracker and downloads.

Build Status Dependencies Status Dev Dependencies Status MIT license

Installation

To install using npm:

$ npm install libravatar

NPM

Usage

To generate the correct avatar URL based on someone's email address, use the following:

const libravatar = require('libravatar');
...
const get_libravatar_url = async () => {
  const avatar_url = await libravatar.get_avatar_url({ email: 'person@example.com', size: 96, default: 'mm', https: false });
}

See the Libravatar documentation for more information on the special values for the "default" parameter.

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i libravatar

    Weekly Downloads

    30

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    24.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • coloradocolby
    • fmarier