1.1.2 • Published 10 months ago

favorite-icon v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
10 months ago

⭐ Favorite Icon

NPM version NPM downloads

Small library for manipulating desktop favicon.

Desktop browser support

  • Chrome: ✅
  • Edge: ✅
  • Firefox: ✅
  • Opera: ✅
  • IE: ❌
  • Safari: ❌ (Safari hides favicons)

Advantages

  • data: and canvas support
  • GIF, JPEG, PNG, SVG and other browser-supported formats
  • Ultra-small code size

Installation

npm install favorite-icon

Using

import { Favicon } from 'favorite-icon';

Favicon.set('/my-icon.png');

API

Favicon.set(src: string | HTMLCanvasElement)

Set the favicon with your own image.

import { Favicon } from 'favorite-icon';

Favicon.set('./image.png');

// or

Favicon.set('data:image/png;base64,...');

// or

const canvas = document.createElement('canvas');
//...
Favicon.set(canvas);

Favicon.reset()

Reset the favicon.

import { Favicon } from 'favorite-icon';

// ...

Favicon.reset();

License

MIT License

Packages

Num.PackageDemoVersionDownload
1.Favorite IconDemoNPM versionNPM downloads
2.📛 Favorite Icon BadgeDemoNPM versionNPM downloads
3.😃 Favorite Icon EmojiDemoNPM versionNPM downloads
4.⚠️ Favorite Icon StatusDemoNPM versionNPM downloads
5.Favorite Icon VideoDemoNPM versionNPM downloads
6.🔴 Favorite Icon DotDemoNPM versionNPM downloads
7.⏱️ Favorite Icon Timeout WorkerDemoNPM versionNPM downloads
1.1.1

10 months ago

1.1.0

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

1.1.2

10 months ago

0.5.0

11 months ago

0.4.0

11 months ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

6 years ago