
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@tdrmk/avatarmaker
Advanced tools
Generate random avatar images (in SVG format).
Inspired from Free Avatar Maker.
# Using yarn
yarn add @tdrmk/avatarmaker
# Using npm
npm install @tdrmk/avatarmaker
Generate a random image (gender chosen at random).
const { generateAvatar } = require("@tdrmk/avatarmaker");
// generate a random avatar
const { svg } = generateAvatar();
// logs the svg image
console.log(svg);
Generate a random image with specified gender (male
or female
).
const { generateAvatar } = require("@tdrmk/avatarmaker");
// generate a random male avatar
const { svg } = generateAvatar({ gender: "male" });
// logs the svg image
console.log(svg);
Obtain features from generated image
const { generateAvatar } = require("@tdrmk/avatarmaker");
// generate a random avatar
const { svg, chosen_zones } = generateAvatar();
// logs the chosen features
console.log(chosen_zones);
// logs the svg image
console.log(svg);
Generate an image with specified features
const { generateAvatar } = require("@tdrmk/avatarmaker");
const chosen_zones = {
backs: 7,
clothes: 1,
ears: 3,
faceshape: 9,
mouth: 14,
eyesiris: 5,
eyesfront: 8,
eyebrows: 3,
nose: 1,
};
// generate a random avatar
const { svg } = generateAvatar({ gender: "male", chosen_zones });
// logs the svg image
console.log(svg);
All available features
const chosen_zones = {
backs: 1,
hairback: 13,
humanbody: 0,
chinshadow: 5,
clothes: 11,
ears: 6,
faceshape: 11,
mouth: 13,
eyesback: 2,
eyesiris: 7,
eyesfront: 0,
facehighlight: 0,
eyebrows: 10,
nose: 2,
beard: 8,
mustache: 11,
hairfront: 13,
glasses: 2,
};
npx @tdrmk/avatarmaker > output.svg
Some randomly generated images
FAQs
generate random avatar images
The npm package @tdrmk/avatarmaker receives a total of 2 weekly downloads. As such, @tdrmk/avatarmaker popularity was classified as not popular.
We found that @tdrmk/avatarmaker 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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.