0.0.12 • Published 2 years ago

emoji-fixer v0.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Emoji-Fixer

This lightweight javascript library allows you to fix emojis that appear without any color (black and white) because of bold 'font-weight' css property.

This "bug" only takes affect on Windows operation systems.

Example of emoji fixing

An example of grayscaled emojis:

Grayscales emojis example

After the emoji-fixer library:

Colored emojis example

How to use this library

You can have a look at the examples directory to see an example of using this library.

Using this library as a node_module (for webpack)

Simply install the library:

$ npm install emoji-fixer

After that you can simply add the following line of code to fix all emojis for your body tag:

// Import the emoji-fixer lib
const fixEmojis = require('emoji-fixer').default;

// Fixes all of the emojis for the entire document
fixEmojis('body');

Using this library in your HTML\Javascript directly

Method 1:

// Import the emoji-fixer lib
import fixEmojis from 'https://cdn.jsdelivr.net/npm/emoji-fixer';

// Fixes all of the emojis for the entire document
fixEmojis('body');

Method 2:

<script type="text/javascript">
    // Import the emoji-fixer lib async
    import('https://cdn.jsdelivr.net/npm/emoji-fixer').then(fixEmojis => {
        // Fixes all of the emojis for the entire document
        fixEmojis.default('body');
    });
</script>