Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sefinek/random-emoji

A module providing various random emoticons along with their names and types. Additionally, it also includes random kaomoji. ๐Ÿˆ ๐Ÿฑ ๐Ÿ™€
https://github.com/sefinek/random-emoji

cat cats circles dog dogs emoji emojis emoticon emoticons foods hearts kaomoji kaomoji-emoticons npm npm-package npm-packages random

Last synced: 16 days ago
JSON representation

A module providing various random emoticons along with their names and types. Additionally, it also includes random kaomoji. ๐Ÿˆ ๐Ÿฑ ๐Ÿ™€

Awesome Lists containing this project

README

        


๐Ÿ˜ป About this package ๐Ÿ˜ผ


Constantly supported Node.js module providing random emojis, including their names and categories. The module also offers random Japanese kaomojis.



The number of downloads
Issues
Last commit
Commit activity
Code size

## ๐Ÿ“ฅ โ€ข Installation
```bash
npm install @sefinek/random-emoji
```

## ๐Ÿ˜ป โ€ข Usage
| Function | Description |
|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|
| [unicode](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L4) | Get a single emoji |
| [emojis](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L7) | Get a random emoji with its name and type |
| [cats](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L11) | Get a random cat |
| [hearts](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L14) | Get a random heart |
| [foods](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L18) | Get a random food |
| [circles](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L22) | Get a random circle |
| [**new** Kaomojis](#kaomoji-endpoints) | Get random kaomojis from the [API](https://api.sefinek.net) |

## ๐Ÿ˜ผ โ€ข Examples
```js
const random = require('@sefinek/random-emoji');

// 1. A single emoji
console.log(random.unicode()); // ๐Ÿฅฐ

// 2. Random emoji along with its visual representation, name, and category
const emoji = random.emojis();
console.log(`Emoji: ${emoji.content}; Name: ${emoji.name}; Type: ${emoji.type}`);
// Emoji: ๐Ÿถ; Name: Dog Face; Type: animal

// 3. Random cat
const cat = random.cats();
console.log(`Emoji: ${cat.content}; Name: ${cat.name}`);
// Emoji: ๐Ÿ˜บ; Name: smiley_cat
```

## โ›ฉ๏ธ โ€ข Kaomojis
### ยป Async/await example
```js
const random = require('@sefinek/random-emoji');

(async () => {
const kaomoji = new random.Kaomojis();

const uwu = await kaomoji.uwu();
console.log('Random UwU:', uwu.message);
})();
```

### ยป Promise example
```js
const random = require('@sefinek/random-emoji');
const kaomoji = new random.Kaomojis();

kaomoji.uwu().then(data => console.log(data));
// or shorter
kaomoji.uwu().then(console.log);
```

### ยป The returned object from [API](https://api.sefinek.net)
```json
{
"success": true,
"status": 200,
"info": {
"category": "kaomoji",
"endpoint": "uwu"
},
"message": "๏ผต๏ฝ—๏ผต"
}
```

###

ยป Kaomoji endpoints

| Function | Link to the API | Version | Example |
|----------|:----------------------------------------------------------|:--------|-----------|
| `cat()` | [Click here](https://api.sefinek.net/api/v2/kaomoji/cat) | v2 | (=^-ฯ‰-^=) |
| `dog()` | [Click here](https://api.sefinek.net/api/v2/kaomoji/dog) | v2 | เฌ˜(โˆชใƒป๏ปŒใƒปโˆช)เฌ“ |
| `owo()` | [Click here](https://api.sefinek.net/api/v2/kaomoji/owo) | v2 | ๐“ž๐”€๐“ž |
| `uwu()` | [Click here](https://api.sefinek.net/api/v2/kaomoji/uwu) | v2 | ๐•Œ๐•จ๐•Œ |
| `love()` | [Click here](https://api.sefinek.net/api/v2/kaomoji/love) | v2 | ใƒฝ(โ™กโ€ฟโ™ก)ใƒŽ |


## ๐Ÿ“ โ€ข Changelog
> [Click here](CHANGELOG.md)

## ๐Ÿค โ€ข Help
Need assistance or have questions about this module? Don't hesitate to open a new [Issue](https://github.com/sefinek24/random-emoji/issues/new) on our GitHub repository.
Our community is ready to help and provide answers to your inquiries.

## โญ โ€ข Thank you
If you use the Random Emoji module and appreciate my work, I'd be grateful if you could give it a star on our [GitHub page](https://github.com/sefinek24/random-emoji).
Your support helps me continue to develop this project and provide new and fun emojis to every user.

## ๐ŸŽ“ โ€ข [MIT License](LICENSE)
Copyright 2022-2024 ยฉ by [Sefinek](https://sefinek.net). All Rights Reserved.