@sefinek/random-emoji 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,15 +1,19 @@
1
+ ## 📥・v1.4.2 (02.06.2022)
2
+ 1. Added typings.
3
+ 2. Small fixes in README.md and README_PL.md.
4
+
1
5
  ## 📥・v1.4.1 (02.06.2022)
2
6
  1. Small changes.
3
7
 
4
8
  ## 📥・v1.4.0 (15.05.2022)
5
9
  1. Added new function `foods()` with random foods.
6
- 2. Fixes in `kaomoji()`.
10
+ 2. Fixes in `new kaomojis()`.
7
11
  3. Small fixes in README.md.
8
12
  4. Added Poland version of README.md file.
9
13
 
10
14
  ## 📥・v1.3.0 (13.05.2022)
11
15
  1. Updated README.md file.
12
- 2. Added new function `new kaomojis()` with random kaomoji from my [API](https://api.skiffybot.xyz). See examples: [[1](https://github.com/sefinek24/random-emoji/blob/main/test.js)] [[2](https://github.com/sefinek24/random-emoji#%EF%B8%8F--kaomojis)]
16
+ 2. Added `new kaomojis()` with random kaomoji from my [API](https://api.skiffybot.xyz). See examples: [[1](https://github.com/sefinek24/random-emoji/blob/main/test.js)] [[2](https://github.com/sefinek24/random-emoji#%EF%B8%8F--kaomojis)]
13
17
  3. Other changes to [index.js](https://github.com/sefinek24/random-emoji/blob/main/index.js) file.
14
18
 
15
19
  ## 📥・v1.2.0 (12.05.2022)
package/README.md CHANGED
@@ -24,7 +24,6 @@ console.log(random.unicode());
24
24
  // 2. Random emoji with name and type
25
25
  const emoji = random.emojis();
26
26
  console.log(`Name: ${emoji.name}; Emoji: ${emoji.content};`);
27
- // > Name: Cat Face; Type: animal; Emoji: 🐱;
28
27
 
29
28
  // 3. Random cat
30
29
  const cat = random.cats();
@@ -33,15 +32,15 @@ console.log(`Name: ${cat.name}; Emoji: ${cat.content};`);
33
32
  ```
34
33
 
35
34
  ## 😻 • Usage
36
- | Function | Description |
37
- |----------------------------------------------------------------------------|--------------------------------------------------------------|
38
- | [emojis](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Random emoji with name and type |
39
- | [unicode](https://github.com/sefinek24/random-emoji/blob/main/test.js) | A single emote |
40
- | [cats](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Return random cat |
41
- | [hearts](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Return random heart |
42
- | [foods](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Return random food |
43
- | [circles](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Return random circle |
44
- | [kaomojis](https://github.com/sefinek24/random-emoji#%EF%B8%8F--kaomojis) | Return random kaomojis from [API](https://api.skiffybot.xyz) |
35
+ | Function | Description |
36
+ |-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
37
+ | [unicode](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L3) | A single emote |
38
+ | [emojis](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L6) | Random emoji with name and type |
39
+ | [cats](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L10) | Return random cat |
40
+ | [hearts](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L14) | Return random heart |
41
+ | [foods](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L18) | Return random food |
42
+ | [circles](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L22) | Return random circle |
43
+ | [kaomojis](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L26) | Return random kaomojis from [API](https://api.skiffybot.xyz) |
45
44
 
46
45
  ## ⛩️ • Kaomoji
47
46
  ### » Async/await example
package/README_PL.md CHANGED
@@ -24,7 +24,7 @@ console.log(random.unicode());
24
24
  // 2. Losowe emoji z nazwą i typem
25
25
  const emoji = random.emojis();
26
26
  console.log(`Nazwa: ${emoji.name}; Emoji: ${emoji.content};`);
27
- // > Nazwa: Cat Face; Type: animal; Emoji: 🐱;
27
+ // > Nazwa: jack-o-lantern; Emoji: 🎃;
28
28
 
29
29
  // 3. Losowy kot
30
30
  const cat = random.cats();
@@ -33,21 +33,20 @@ console.log(`Nazwa: ${cat.name}; Emoji: ${cat.content};`);
33
33
  ```
34
34
 
35
35
  ## 😻 • Użycie
36
- | Funkcja | Opis |
37
- |---------------------------------------------------------------------------|----------------------------------------------------------|
38
- | [emojis](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Losowe emoji z nazwą i typem |
39
- | [unicode](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Pojedyncza emotikona |
40
- | [cats](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Zwraca losowego kota |
41
- | [hearts](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Zwraca losowe serce |
42
- | [foods](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Zwraca losowe jedzenie |
43
- | [circles](https://github.com/sefinek24/random-emoji/blob/main/test.js) | Zwraca losowe kółko |
44
- | [kaomojis](https://github.com/sefinek24/random-emoji#%EF%B8%8F--kaomojis) | Zwraca losowe kaomoji z [API](https://api.skiffybot.xyz) |
36
+ | Funkcja | Opis |
37
+ |-----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
38
+ | [unicode](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L3) | Pojedyncza emotikona |
39
+ | [emojis](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L6) | Losowe emoji z nazwą i typem |
40
+ | [cats](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L10) | Zwraca losowego kota |
41
+ | [hearts](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L14) | Zwraca losowe serce |
42
+ | [foods](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L18) | Zwraca losowe jedzenie |
43
+ | [circles](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L22) | Zwraca losowe kółko |
44
+ | [kaomojis](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L26) | Zwraca losowe kaomoji z [API](https://api.skiffybot.xyz) |
45
45
 
46
46
  ## ⛩️ • Kaomoji
47
47
  ### » Przykład Async/await
48
48
  ```js
49
49
  const random = require('@sefinek/random-emoji');
50
- const kaomoji = new random.kaomojis();
51
50
 
52
51
  (async () => {
53
52
  const kaomoji = new random.kaomojis();
package/index.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ export function unicode(): String
2
+ export function emojis(): Object
3
+ export function cats(): Object
4
+ export function hearts(): Object
5
+ export function foods(): Object
6
+ export function circles(): Object
7
+
8
+ export class kaomojis {
9
+ cat()
10
+ dog()
11
+ owo()
12
+ uwu()
13
+ love()
14
+ }
package/index.js CHANGED
@@ -37,8 +37,8 @@ class SkiffyAPI {
37
37
  }
38
38
 
39
39
  module.exports = {
40
- emojis: () => emojis[Math.floor(Math.random() * emojis.length)],
41
40
  unicode: () => unicode[Math.floor(Math.random() * unicode.length)],
41
+ emojis: () => emojis[Math.floor(Math.random() * emojis.length)],
42
42
  cats: () => cats[Math.floor(Math.random() * cats.length)],
43
43
  hearts: () => hearts[Math.floor(Math.random() * hearts.length)],
44
44
  foods: () => foods[Math.floor(Math.random() * foods.length)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sefinek/random-emoji",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Returns a random emoticons (name, type) and kaomojis.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,5 +32,6 @@
32
32
  "bugs": {
33
33
  "url": "https://github.com/sefinek24/random-emoji/issues"
34
34
  },
35
- "homepage": "https://github.com/sefinek24/random-emoji#readme"
35
+ "homepage": "https://github.com/sefinek24/random-emoji#readme",
36
+ "types": "./index.d.ts"
36
37
  }