@sefinek/random-emoji 1.0.1 β†’ 1.1.1

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,4 +1,7 @@
1
- ## πŸ“₯・Version v1.0.1 (STABLE)
1
+ ## πŸ“₯・Version v1.1.1 (STABLE)
2
+ **1.** Added new function `hearts()` with random cat hearts.
3
+
4
+ ## πŸ“₯・Version v1.0.1
2
5
  **1.** Added new function `cats()` with random cat emojis.
3
6
  **2.** Added **CHANGELOG.md** file.
4
7
  **2.** Changes:
package/README.md CHANGED
@@ -16,19 +16,24 @@
16
16
  ```js
17
17
  const random = require('@sefinek/random-emoji');
18
18
 
19
- // 1. Random emoji with name and type
19
+ // 1. A single emote
20
+ console.log(unicode());
21
+ // Output Β» πŸ₯°
22
+
23
+ // 2. Random emoji with name and type
20
24
  const emoji = random.emojis();
21
25
  console.log(`Name: ${emoji.name}; Type: ${emoji.type}; Emoji: ${emoji.content};`);
22
26
  // Output Β» Name: Cat Face; Type: animal; Emoji: 🐱;
23
27
 
24
- // 2. A single emote
25
- console.log(unicode());
26
- // Output Β» πŸ₯°
27
-
28
28
  // 3. Random cats
29
29
  const cat = cats();
30
30
  console.log(`Name: ${cat.name}; Slashes: ${cat.slashes}; Emoji: ${cat.content};`);
31
31
  // Output Β» Name: smiley_cat; Slashes: \\😺; Emoji: 😺;
32
+
33
+ // 4. Random hearts
34
+ const heart = hearts();
35
+ console.log(`Name: ${heart.name}; Slashes: ${heart.slashes}; Emoji: ${heart.content};`);
36
+ // Output Β» Name: blue_heart; Slashes: \\πŸ’™; Emoji: πŸ’™;
32
37
  ```
33
38
 
34
39
  ## 😻 β€’ Functions list
@@ -36,6 +41,7 @@ console.log(`Name: ${cat.name}; Slashes: ${cat.slashes}; Emoji: ${cat.content};`
36
41
  emojis() // Random emoji with name and type
37
42
  unicode() // A single emote
38
43
  cats() // Return random cats
44
+ hearts() // Return random hearts
39
45
  ```
40
46
 
41
47
  ## πŸ“ β€’ Changelog
package/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  const emojis = require('./json/emojis.json');
2
2
  const unicode = require('./json/unicode.json');
3
3
  const cats = require('./json/cats.json');
4
+ const hearts = require('./json/hearts.json');
4
5
 
5
6
  exports.emojis = () => emojis[Math.floor(Math.random() * emojis.length)];
6
7
  exports.unicode = () => unicode[Math.floor(Math.random() * unicode.length)];
7
- exports.cats = () => cats[Math.floor(Math.random() * cats.length)];
8
+ exports.cats = () => cats[Math.floor(Math.random() * cats.length)];
9
+ exports.hearts = () => hearts[Math.floor(Math.random() * hearts.length)];
@@ -0,0 +1 @@
1
+ [{"content":"πŸ’Œ","slashes":"\\πŸ’Œ","name":"love_letter"},{"content":"πŸ’","slashes":"\\πŸ’","name":"gift_heart"},{"content":"❣️","slashes":"\\❣️","name":"heart_exclamation"},{"content":"πŸ’”","slashes":"\\πŸ’”","name":"broken_heart"},{"content":"❀️‍πŸ”₯","slashes":"\\❀️‍πŸ”₯","name":"heart_on_fire"},{"content":"β€οΈβ€πŸ©Ή","slashes":"\\β€οΈβ€πŸ©Ή","name":"mending_heart"},{"content":"❀️","slashes":"\\❀️","name":"heart"},{"content":"πŸ’›","slashes":"\\πŸ’›","name":"yellow_heart"},{"content":"πŸ’š","slashes":"\\πŸ’š","name":"green_heart"},{"content":"πŸ’™","slashes":"\\πŸ’™","name":"blue_heart"},{"content":"πŸ’œ","slashes":"\\πŸ’œ","name":"purple_heart"},{"content":"🀎","slashes":"\\🀎","name":"brown_heart"},{"content":"πŸ–€","slashes":"\\πŸ–€","name":"black_heart"},{"content":"🀍","slashes":"\\🀍","name":"white_heart"},{"content":"πŸ«€","slashes":"\\πŸ«€","name":"anatomical_heart"},{"content":"πŸ’’","slashes":"\\πŸ’’","name":"wedding"},{"content":"πŸ’˜","slashes":"\\πŸ’˜","name":"cupid"},{"content":"πŸ’—","slashes":"\\πŸ’—","name":"heartpulse"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sefinek/random-emoji",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "Returns a random emoticon and its name and type.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,10 +13,13 @@
13
13
  "keywords": [
14
14
  "random",
15
15
  "emoji",
16
+ "emojis",
16
17
  "emoticon",
17
18
  "unicode",
18
- "cats",
19
19
  "cat",
20
+ "cats",
21
+ "heart",
22
+ "hearts",
20
23
  "name",
21
24
  "type"
22
25
  ],
package/test.js CHANGED
@@ -1,12 +1,16 @@
1
- const { emojis, unicode, cats } = require('./index.js');
1
+ const { unicode, emojis, cats, hearts } = require('./index.js');
2
+
3
+ // A single emote
4
+ console.log(unicode());
2
5
 
3
6
  // Random emoji with name and type
4
7
  const emoji = emojis();
5
8
  console.log(`Name: ${emoji.name}; Type: ${emoji.type}; Emoji: ${emoji.content};`);
6
9
 
7
- // A single emote
8
- console.log(unicode());
9
-
10
10
  // Random cats
11
11
  const cat = cats();
12
- console.log(`Name: ${cat.name}; Slashes: ${cat.slashes}; Emoji: ${cat.content};`);
12
+ console.log(`Name: ${cat.name}; Slashes: ${cat.slashes}; Emoji: ${cat.content};`);
13
+
14
+ // Random hearts
15
+ const heart = hearts();
16
+ console.log(`Name: ${heart.name}; Slashes: ${heart.slashes}; Emoji: ${heart.content};`);