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

char-to-avatar

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

char-to-avatar - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

8

examples/index.js

@@ -10,3 +10,3 @@ // **Github:** https://github.com/teambition/char-to-avatar

var app = toa(function *() {
var app = toa(function () {
if (this.path === '/favicon.ico') this.body = null

@@ -19,6 +19,4 @@ else {

})
var dataURL = yield avatar.toDataURL()
console.log(dataURL.length)
this.type = 'html'
this.body = `<img src="${dataURL}" />`
this.type = 'png'
this.body = avatar.pngStream()
}

@@ -25,0 +23,0 @@ })

@@ -13,3 +13,2 @@ // **Github:** https://github.com/teambition/char-to-avatar

CharToAvatar.textBaseline = 'middle'
CharToAvatar.textFactor = 0.95

@@ -41,5 +40,3 @@ function CharToAvatar (character, options) {

ctx.patternQuality = 'nearest'
var fix = Math.floor(radius * CharToAvatar.textFactor)
ctx.fillText(character, Math.floor(fix * CharToAvatar.textFactor), fix, fix)
ctx.fillText(character, radius, radius, radius)
}

@@ -46,0 +43,0 @@

@@ -7,3 +7,3 @@ {

],
"version": "0.1.1",
"version": "0.1.2",
"main": "index.js",

@@ -10,0 +10,0 @@ "repository": {

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