
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@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 avatarmaker > output.svg
Some randomly generated images
FAQs
generate random avatar images
The npm package @tdrmk/avatarmaker receives a total of 26 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.