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

smart-avatar

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smart-avatar - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

dist/index.js

10

package.json
{
"name": "smart-avatar",
"version": "1.0.3",
"version": "1.0.4",
"description": "Render avatars with dynamic, defined fallback",
"main": "./dist/smart-avatar.js",
"main": "./dist/index.js",
"directories": {

@@ -13,5 +13,3 @@ "lib": "./lib"

"scripts": {
"build": "webpack && gulp --gulpfile ./gulpfile.browser.js",
"build:browser": "gulp --gulpfile ./gulpfile.browser.js",
"build:demo": "gulp --gulpfile ./gulpfile.demo.js",
"build": "gulp --gulpfile ./gulpfile.js && terser --compress --mangle --output dist/index.js -- dist/index.js",
"test": "jest ./test/automated/*",

@@ -50,3 +48,5 @@ "test:manual": "gulp --gulpfile ./test/manual/gulpfile.test.js && http-server ./test/manual -p 7878"

"gulp-replace": "^1.0.0",
"gulp-strip-comments": "^2.5.2",
"jest": "^24.1.0",
"terser": "^4.6.11",
"webpack": "^4.29.0",

@@ -53,0 +53,0 @@ "webpack-cli": "^3.2.1"

@@ -1,4 +0,5 @@

# smart-avatar [![Build Status](https://travis-ci.com/jaredgorski/smart-avatar.svg?branch=master)](https://travis-ci.com/jaredgorski/smart-avatar) <img align="left" height="100" src="https://raw.githubusercontent.com/jaredgorski/smart-avatar/master/.media/smartfox%40640.png">
Render avatars with dynamic, defined fallback
# smart-avatar [![Build Status](https://travis-ci.com/jaredgorski/smart-avatar.svg?branch=master)](https://travis-ci.com/jaredgorski/smart-avatar) ![David](https://img.shields.io/david/jaredgorski/smart-avatar) ![npm bundle size](https://img.shields.io/bundlephobia/min/smart-avatar.svg) <img align="left" height="100" src="https://raw.githubusercontent.com/jaredgorski/smart-avatar/master/.media/smartfox%40640.png">
Render avatars with dynamic, defined fallbackI
![](https://github.com/jaredgorski/smart-avatar/raw/master/.media/smart-avatar_demo.gif)

@@ -33,4 +34,5 @@

### https://smart-avatar-demo.jaredgorski6.now.sh/
### https://jaredgorski.com/work/smart-avatar/demo
---

@@ -43,4 +45,3 @@

```javascript
import smartAvatar from 'smart-avatar';
import smartAvatar from 'smart-avatar'
const targetElement = document.querySelector('.topbar-user');

@@ -185,2 +186,3 @@

_Note: `color` and `textColor` only matter in the case of a non-Gravatar icon or an initials avatar._
_Also note: in the future, the initials avatar will be made more available, rather than simply being a fallback option._

@@ -222,3 +224,15 @@ ## "unstyled" Flag

## Disposal
```javascript
import smartAvatar from 'smart-avatar';
const targetElement = document.querySelector(.topbar-user);
// ... code ...
smartAvatar(targetEl, 'dispose');
```
There may come a time where you want to dispose of all smart-avatar assets that are child-nodes of a given element. By passing a parent element alongside the string `dispose` in place of the configuration object, you can remove all smart-avatar nodes from the given parent element.
# Available Icon Options

@@ -278,3 +292,2 @@

# Coming Soon:
- UMD standardization: no need to import a separate file in ES modules.
- General improvements: whatever I find necessary, and whatever you suggest! Make issues and send PRs please :smiley:

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