https://github.com/baethon/munci
Convert string to emoji face
https://github.com/baethon/munci
Last synced: about 1 year ago
JSON representation
Convert string to emoji face
- Host: GitHub
- URL: https://github.com/baethon/munci
- Owner: baethon
- License: mit
- Created: 2019-10-16T19:27:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T15:50:18.000Z (over 4 years ago)
- Last Synced: 2025-02-16T21:18:09.395Z (over 1 year ago)
- Language: JavaScript
- Size: 486 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🖤💛 Mùnči [](https://travis-ci.org/baethon/munci)

## Installation
```
npm i @baethon/munci
```
## About
Mùnči is a simple one-way hash function which transforms given string to an emoji face. Package uses emoji set including people with all genders and skin tones.
Due to limited number of emojis it's highly possible that resulting emoji will be generated also for different string values.
Possible use cases:
- logging stream (like... Slack!) when one needs to identify quickly a user
- simplified avatar system
## Usage
Package exports one function, which accepts a string value. There's no way to filter the set of emojis by gender or skin tone so it's possible that it will return weird results :)
```js
const munci = require('@baethon/munci')
const userAvatar = munci('Jon Snow')
```
## Testing
```
yarn test
```
## Building
Package uses emojis set provided by [emojilib](https://github.com/muan/emojilib). To reload/refresh it use:
```
yarn build
```
## Credits
- [emojilib](https://github.com/muan/emojilib)
- [skin-tone](https://github.com/sindresorhus/skin-tone)