Coder Social home page Coder Social logo

clydedz / give-me-an-avatar-npm Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 303 KB

Gets a random avatar URL from a collection of different avatar generation services.

Home Page: https://bit.ly/give-me-an-avatar

License: MIT License

TypeScript 100.00%
npm npm-package avatar avatar-generator avatar-placeholder avatar-service javascript-library typescript random-avatar ts-mocha

give-me-an-avatar-npm's Introduction


Give me an avatar npm package icon

Give Me an Avatar

Gets a random avatar URL from a collection of different avatar generation services.

Build status Azure DevOps tests Quality Gate Status Maintainability Rating MIT License npm Tweet about this

Usage

Install the package from npm using the following command.

npm i give-me-an-avatar

After installing, simply import Give Me an Avatar in your file.

const avatars = require("give-me-an-avatar");

Consume the giveMeAnAvatar() API to get an avatar URL that you can use directly as an image. You can either call the method without any parameters or supply the settings object to customize your avatar a bit. All settings are pretty self-explanatory and are not mandatory. For example:

let image = avatars.giveMeAnAvatar({
                Name: "John Smith",
                Size: 128
            }); 

The image variable will have the avatar image URL.

If you'd like to consume this package via a CDN, please see this demo.

Supported avatar services

Service Avatar example
placeholder.com image
placeimg.com image
placekitten.com image
dummyimage.com image
loremflickr.com image
baconmockup.com image
placebeard.it image
fakeimg.pl image
thispersondoesnotexist.com
picsum.photos image
fillmurray.com image
placecage.com image
stevensegallery.com image
gravatar.com image
ui-avatars.com image
generative-placeholders.glitch.me image
robohash.org image image image image
avatars.dicebear.com image image image image image image
avatar.uimaterial.com image image image image

Notes

  • I'm not using avataaars separately since avatars.dicebear.com includes avataaars.
  • Placekitten image might appear broken at times in the table above, however, the image service itself runs fine.

Credits

  • All the avatar services used in this npm package are outlined in the table above.
  • Package logo created using AutoDraw.
  • This NPM package is developed by Clyde D'Souza.

give-me-an-avatar-npm's People

Contributors

clydedz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.