Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dicebear/avatars-bottts-sprites

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/avatars-bottts-sprites - npm Package Compare versions

Comparing version 4.0.8 to 4.1.0-alpha.0

9

lib/index.js

@@ -20,8 +20,3 @@ "use strict";

function default_1(random, options = {}) {
options.primaryColorLevel = options.primaryColorLevel || 600;
options.secondaryColorLevel = options.secondaryColorLevel || 400;
options.mouthChance = options.mouthChance || 100;
options.sidesChance = options.sidesChance || 100;
options.textureChance = options.textureChance || 50;
options.topChange = options.topChange || 100;
options = Object.assign({ primaryColorLevel: 600, secondaryColorLevel: 400, mouthChance: 100, sidesChance: 100, textureChance: 50, topChance: 100 }, options);
let colorsCollection = [];

@@ -50,3 +45,3 @@ Object.keys(color_1.default.collection).forEach((color) => {

group(random, sides(secondaryColor), options.sidesChance, 0, 66),
group(random, top(secondaryColor), options.topChange, 41, 0),
group(random, top(secondaryColor), options.topChance, 41, 0),
group(random, face(primaryColor, random.bool(options.textureChance) ? texture() : undefined), 100, 25, 44),

@@ -53,0 +48,0 @@ group(random, mouth(), options.mouthChance, 52, 124),

@@ -10,4 +10,4 @@ import { ColorCollection, Color } from '@dicebear/avatars/lib/types';

textureChance?: number;
topChange?: number;
topChance?: number;
};
export default Options;
{
"name": "@dicebear/avatars-bottts-sprites",
"version": "4.0.8",
"version": "4.1.0-alpha.0",
"description": "Bottts sprite collection for DiceBear Avatars",

@@ -34,4 +34,3 @@ "main": "lib/index.js",

"devDependencies": {
"@dicebear/avatars": "^4.0.8",
"typescript": "^3.4.5"
"@dicebear/avatars": "^4.1.0-alpha.0"
},

@@ -45,3 +44,3 @@ "files": [

},
"gitHead": "a7e844a4774c388678ae05152437609034acd43b"
"gitHead": "ec9d1494fa1142d97665d2a3ad8a4ed93ee28368"
}

@@ -57,19 +57,19 @@ ![DiceBear Avatars - Bottts Sprite Collection](https://raw.githubusercontent.com/DiceBear/avatars/master/packages/avatars-bottts-sprites/banner.svg?sanitize=true)

| name | type | default | description |
| ------------------- | ---------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| radius | number | `0` | Avatar border radius |
| base64 | bool | `false` | Return avatar as base64 data uri instead of XML <br> **Not supported by the HTTP API** |
| width | number | `null` | Fixed width |
| height | number | `null` | Fixed height |
| margin | number | `0` | Avatar margin in percent<br> **HTTP-API limitation** Max value `25` |
| background | string | `null` | Any valid color identifier<br> **HTTP-API limitation** Only hex _(3-digit, 6-digit and 8-digit)_ values are allowed. Use url encoded hash: `%23`. |
| userAgent | string | `window.navigator.userAgent` | User-Agent for legacy browser fallback<br> **Automatically detected by the HTTP API** |
| colors | array of strings | `null` | Possible values: `amber`, `blue`, `blueGrey`, `brown`, `cyan`, `deepOrange`, `deepPurple`, `green`, `grey`, `indigo`, `lightBlue`, `lightGreen`, `lime`, `orange`, `pink`, `purple`, `red`, `teal`, `yellow` |
| primaryColorLevel | number | `600` | Possible values: `50`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` |
| secondaryColorLevel | number | `400` | Possible values: `50`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` |
| colorful | boolean | `100` | Probability in percent |
| mouthChance | number | `100` | Probability in percent |
| sidesChance | number | `100` | Probability in percent |
| textureChance | number | `50` | Probability in percent |
| topChange | number | `100` | Probability in percent |
| name | alias | type | default | description |
| ------------------- | ----- | ---------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| radius | r | number | `0` | Avatar border radius |
| base64 | | bool | `false` | Return avatar as base64 data uri instead of XML <br> **Not supported by the HTTP API** |
| width | w | number | `null` | Fixed width |
| height | h | number | `null` | Fixed height |
| margin | m | number | `0` | Avatar margin in percent<br> **HTTP-API limitation** Max value `25` |
| background | b | string | `null` | Any valid color identifier<br> **HTTP-API limitation** Only hex _(3-digit, 6-digit and 8-digit)_ values are allowed. Use url encoded hash: `%23`. |
| userAgent | | string | `window.navigator.userAgent` | User-Agent for legacy browser fallback<br> **Automatically detected by the HTTP API** |
| colors | | array of strings | `null` | Possible values: `amber`, `blue`, `blueGrey`, `brown`, `cyan`, `deepOrange`, `deepPurple`, `green`, `grey`, `indigo`, `lightBlue`, `lightGreen`, `lime`, `orange`, `pink`, `purple`, `red`, `teal`, `yellow` |
| primaryColorLevel | | number | `600` | Possible values: `50`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` |
| secondaryColorLevel | | number | `400` | Possible values: `50`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900` |
| colorful | | boolean | `false` | Assigns sides and top a random secondary color |
| mouthChance | | number | `100` | Probability in percent avatar will have a mouth |
| sidesChance | | number | `100` | Probability in percent avatar will have side elements |
| textureChance | | number | `50` | Probability in percent avatar will have texture |
| topChance | | number | `100` | Probability in percent avatar will have a top element |

@@ -76,0 +76,0 @@ ## Further information

Sorry, the diff of this file is not supported yet

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