Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makstashkevich/emojik
Emoji pack to JavaScript
https://github.com/makstashkevich/emojik
Last synced: 25 days ago
JSON representation
Emoji pack to JavaScript
- Host: GitHub
- URL: https://github.com/makstashkevich/emojik
- Owner: MakStashkevich
- License: mit
- Created: 2021-01-13T11:16:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T12:15:20.000Z (almost 4 years ago)
- Last Synced: 2024-11-21T19:42:55.275Z (about 1 month ago)
- Language: JavaScript
- Size: 82 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
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
$ npm install emojik
```## Example
### ES5
```javascript
// Import module
const Emojik = require('emojik');// From path
console.log(Emojik.goblin.icon());// Or from icon() function
console.log(Emojik.icon('goblin'));// result: 👺
```### ES6
```javascript
// Import module
import Emojik from 'emojik';// From path
console.log(Emojik.goblin.icon());// Or from icon() function
console.log(Emojik.icon('goblin'));// result: 👺
```## FAQ
### How use smiles with need colors?
```javascript
// From path
console.log(Emojik.ok_hand.icon('light'));// Or from icon() function
console.log(Emojik.icon('ok hand', 'light'));// result: 👌🏻
```
#### Available colors
`{ "light", "medium-light", "medium", "medium-dark", "dark" }`### What happens, if I paste to icon() function don't correct name?
```javascript
// You can paste names as you wish// So
console.log(Emojik.icon('flexed biceps'));// Or so..
console.log(Emojik.icon('FLEXED_BICEPS'));// Or so....
console.log(Emojik.icon(':::::::flexed+biceps::::::::'));// result will be the same
// 💪
```