@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 +4 -1
- package/README.md +11 -5
- package/index.js +3 -1
- package/json/hearts.json +1 -0
- package/package.json +5 -2
- package/test.js +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
## π₯γ»Version v1.
|
|
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.
|
|
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)];
|
package/json/hearts.json
ADDED
|
@@ -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.
|
|
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 {
|
|
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};`);
|