emojik

Emoji pack to JavaScript

Usage no npm install needed!

<script type="module">
  import emojik from 'https://cdn.skypack.dev/emojik';
</script>

README

Emoji for JavaScript

I really a lot of use emoji. And I'm tired copy-past them from the messengers. After I'm created this module, which the solved a problem. I hope, this help you too.

Installation

$ npm install emojik

Example

ES5

// Import module
const Emojik = require('emojik');

// From path
console.log(Emojik.goblin.icon());

// Or from get() function
console.log(Emojik.get('goblin'));

// result: 👺

ES6

// Import module
import Emojik from 'emojik';

// From path
console.log(Emojik.goblin.icon());

// Or from get() function
console.log(Emojik.get('goblin'));

// result: 👺

FAQ

How use smiles with need colors?

// From path
console.log(Emojik.ok_hand.icon('light'));

// Or from get() function
console.log(Emojik.get('ok hand', 'light'));

// result: 👌🏻

Available colors

{ "light", "medium-light", "medium", "medium-dark", "dark" }

What happens, if I paste to get() function don't correct name?

// You can paste names as you wish

// So
console.log(Emojik.get('flexed biceps'));

// Or so..
console.log(Emojik.get('FLEXED_BICEPS'));

// Or so....
console.log(Emojik.get(':::::::flexed+biceps::::::::'));

// result will be the same
// 💪