New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dicebear/lorelei

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/lorelei - npm Package Compare versions

Comparing version 5.0.4 to 5.1.0

10

lib/index.js

@@ -32,4 +32,14 @@ /**

body: `<g transform="translate(10 -60)">${(_b = (_a = components.hair) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(10 -60)">${(_d = (_c = components.hairAccessories) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g>`,
extra: () => ({
...Object.entries(components).reduce((acc, [key, value]) => {
acc[key] = value === null || value === void 0 ? void 0 : value.name;
return acc;
}, {}),
...Object.entries(colors).reduce((acc, [key, value]) => {
acc[`${key}Color`] = value;
return acc;
}, {}),
}),
};
};
export { schema } from './schema.js';

5

lib/utils/convertColor.js

@@ -8,6 +8,3 @@ /**

export function convertColor(color) {
if ('transparent' === color) {
return color;
}
return `#${color}`;
return 'transparent' === color ? color : `#${color}`;
}

22

lib/utils/getColors.js

@@ -9,16 +9,16 @@ /**

export function getColors({ prng, options }) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
return {
'hair': convertColor((_b = prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [])) !== null && _b !== void 0 ? _b : 'transparent'),
'skin': convertColor((_d = prng.pick((_c = options.skinColor) !== null && _c !== void 0 ? _c : [])) !== null && _d !== void 0 ? _d : 'transparent'),
'earrings': convertColor((_f = prng.pick((_e = options.earringsColor) !== null && _e !== void 0 ? _e : [])) !== null && _f !== void 0 ? _f : 'transparent'),
'eyebrows': convertColor((_h = prng.pick((_g = options.eyebrowsColor) !== null && _g !== void 0 ? _g : [])) !== null && _h !== void 0 ? _h : 'transparent'),
'eyes': convertColor((_k = prng.pick((_j = options.eyesColor) !== null && _j !== void 0 ? _j : [])) !== null && _k !== void 0 ? _k : 'transparent'),
'freckles': convertColor((_m = prng.pick((_l = options.frecklesColor) !== null && _l !== void 0 ? _l : [])) !== null && _m !== void 0 ? _m : 'transparent'),
'glasses': convertColor((_p = prng.pick((_o = options.glassesColor) !== null && _o !== void 0 ? _o : [])) !== null && _p !== void 0 ? _p : 'transparent'),
'mouth': convertColor((_r = prng.pick((_q = options.mouthColor) !== null && _q !== void 0 ? _q : [])) !== null && _r !== void 0 ? _r : 'transparent'),
'nose': convertColor((_t = prng.pick((_s = options.noseColor) !== null && _s !== void 0 ? _s : [])) !== null && _t !== void 0 ? _t : 'transparent'),
'hairAccessories': convertColor((_v = prng.pick((_u = options.hairAccessoriesColor) !== null && _u !== void 0 ? _u : [])) !== null && _v !== void 0 ? _v : 'transparent'),
'hair': convertColor(prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
'skin': convertColor(prng.pick((_b = options.skinColor) !== null && _b !== void 0 ? _b : [], 'transparent')),
'earrings': convertColor(prng.pick((_c = options.earringsColor) !== null && _c !== void 0 ? _c : [], 'transparent')),
'eyebrows': convertColor(prng.pick((_d = options.eyebrowsColor) !== null && _d !== void 0 ? _d : [], 'transparent')),
'eyes': convertColor(prng.pick((_e = options.eyesColor) !== null && _e !== void 0 ? _e : [], 'transparent')),
'freckles': convertColor(prng.pick((_f = options.frecklesColor) !== null && _f !== void 0 ? _f : [], 'transparent')),
'glasses': convertColor(prng.pick((_g = options.glassesColor) !== null && _g !== void 0 ? _g : [], 'transparent')),
'mouth': convertColor(prng.pick((_h = options.mouthColor) !== null && _h !== void 0 ? _h : [], 'transparent')),
'nose': convertColor(prng.pick((_j = options.noseColor) !== null && _j !== void 0 ? _j : [], 'transparent')),
'hairAccessories': convertColor(prng.pick((_k = options.hairAccessoriesColor) !== null && _k !== void 0 ? _k : [], 'transparent')),
};
}
;
{
"name": "@dicebear/lorelei",
"version": "5.0.4",
"version": "5.1.0",
"description": "Avatar style for DiceBear",

@@ -32,3 +32,3 @@ "keywords": [

"devDependencies": {
"@dicebear/core": "^5.0.4",
"@dicebear/core": "^5.1.0",
"@tsconfig/recommended": "^1.0.1",

@@ -48,3 +48,3 @@ "del-cli": "^4.0.1",

},
"gitHead": "0158d13ad3760498a3622ca8bda8420929acc6dc"
"gitHead": "4f9e4686aa33809026d6ce25c4a5f2d0750d59f4"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc