Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
js-gravatar
Advanced tools
Readme
Copy dist/js-gravatar.js into your library folder Load it into your HTML script
<script type="text/javascript" src="path/to/js-gravatar.js"></script>
You can use the UNPKG link https://unpkg.com/js-gravatar@1.1.2/dist/js-gravatar.js
. Remember to update the package number to the most recent.
Call the method with its options.
JsGravatar({ element, numberOfDice: 2, callback });
Install with npm.
npm install --save js-gravatar
Install with yarn.
yarn add js-gravatar
import the library
ES5
const JsGravatar = require('js-gravatar');
ES6
import JsGravatar from 'js-gravatar';
Call the method
JsGravatar({ email: 'user@email.com', size: 10, defaultImage: 'identicon' });
JsGravatar({ email: 'user@email.com', defaultImage: 'monsterid' });
email
: Email address of the user to generate gravatar for - stringmd5Hash
: Optional: MD5 hash of the email above. If email is provided, md5hash will be ignored. If neither email nor md5hash is provided, the library will throw en error - stringsize
: Optional: The size of the image to be displayed. Should be from 1 to 2048 - numberdefaultImage
: What image should be used if email does not have a gravatar. See options below - stringDefaultimage Options - ['404', 'mp', 'identicon', 'monsterid', 'wavatar', 'retro', 'robohash', 'blank']
MIT License
FAQs
A vanilla JS library to get a user's gravatar and if it doesn't exist provides one different from gravatar default
We found that js-gravatar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.