@sefinek/random-emoji 2.0.2 → 2.0.4

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.
Files changed (3) hide show
  1. package/README.md +11 -11
  2. package/index.js +4 -5
  3. package/package.json +48 -48
package/README.md CHANGED
@@ -17,15 +17,15 @@ npm install @sefinek/random-emoji
17
17
 
18
18
 
19
19
  ## 😻 • Usage
20
- | Function | Description |
21
- |-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
22
- | [unicode](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L3) | A single emote |
23
- | [emojis](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L6) | Random emoji with name and type |
24
- | [cats](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L10) | Return random cat |
25
- | [hearts](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L14) | Return random heart |
26
- | [foods](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L18) | Return random food |
27
- | [circles](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L22) | Return random circle |
28
- | [Kaomojis](https://github.com/sefinek24/random-emoji/blob/ab58b364710a4c7106721808e81ccdc7590c4965/test.js#L26) | Return random kaomojis from [API](https://api.sefinek.net) |
20
+ | Function | Description |
21
+ |----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
22
+ | [unicode](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L4) | A single emoji |
23
+ | [emojis](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L7) | Random emoji with name and type |
24
+ | [cats](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L11) | Return random cat |
25
+ | [hearts](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L14) | Return random heart |
26
+ | [foods](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L18) | Return random food |
27
+ | [circles](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L22) | Return random circle |
28
+ | [**new** Kaomojis](https://github.com/sefinek24/random-emoji/blob/f8e6a007717dc5e51adc31b4418bb954e2d364e5/example.js#L28) | Return random kaomojis from [API](https://api.sefinek.net) |
29
29
 
30
30
 
31
31
  ## 😼 • Examples
@@ -94,7 +94,7 @@ kaomoji.love().then(console.log);
94
94
 
95
95
 
96
96
  ## 📝 • Changelog
97
- > https://github.com/sefinek24/random-emoji/blob/main/CHANGELOG.md
97
+ > [Click here](CHANGELOG.md)
98
98
 
99
99
 
100
100
  ## 🤝 • Help
@@ -107,5 +107,5 @@ If you use the Random Emoji module and appreciate my work, I'd be grateful if yo
107
107
  Your support helps me continue to develop this project and provide new and fun emojis to every user.
108
108
 
109
109
 
110
- ## 🎓 [MIT License](LICENSE)
110
+ ## 🎓 [MIT License](LICENSE)
111
111
  Copyright 2023 © by [Sefinek](https://sefinek.net). All Rights Reserved.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const { get } = require('node:https');
1
+ const { get } = require('https');
2
2
  const emojis = require('./data/emoji/random.json');
3
3
  const unicode = require('./data/emoji/unicode.json');
4
4
  const cats = require('./data/emoji/cat.json');
@@ -6,7 +6,7 @@ const hearts = require('./data/emoji/heart.json');
6
6
  const foods = require('./data/emoji/food.json');
7
7
  const circles = require('./data/emoji/circle.json');
8
8
  const endpoints = require('./data/endpoints.json');
9
- const { name, version } = require('./package.json');
9
+ const { version } = require('./package.json');
10
10
 
11
11
  /**
12
12
  * Configuration options for HTTP requests.
@@ -16,7 +16,7 @@ const options = {
16
16
  method: 'GET',
17
17
  port: 443,
18
18
  headers: {
19
- 'User-Agent': `${name}/${version} (+https://github.com/sefinek24/random-emoji)`,
19
+ 'User-Agent': `random-emoji/${version} (+https://github.com/sefinek24/random-emoji)`,
20
20
  'Accept': 'application/json',
21
21
  'Cache-Control': 'no-cache',
22
22
  'CF-IPCountry': 'false',
@@ -47,7 +47,7 @@ function getContent(url) {
47
47
  res.setEncoding('utf8');
48
48
 
49
49
  let rawData = '';
50
- res.on('data', (chunk) => {
50
+ res.on('data', chunk => {
51
51
  rawData += chunk;
52
52
  });
53
53
 
@@ -77,7 +77,6 @@ class SefinekAPI {
77
77
  Object.keys(endpoints).forEach(endpoint => {
78
78
  /**
79
79
  * Access a specific random content endpoint.
80
- *
81
80
  * @method
82
81
  * @returns {Promise} - A Promise that resolves with the fetched content or rejects with an error.
83
82
  */
package/package.json CHANGED
@@ -1,48 +1,48 @@
1
- {
2
- "name": "@sefinek/random-emoji",
3
- "version": "2.0.2",
4
- "description": "A module providing various random emoticons along with their names and types. Additionally, it also includes random kaomoji.",
5
- "keywords": [
6
- "random",
7
- "emoji",
8
- "emojis",
9
- "emoticon",
10
- "unicode",
11
- "cat",
12
- "cats",
13
- "heart",
14
- "hearts",
15
- "food",
16
- "foods",
17
- "circle",
18
- "circles",
19
- "name",
20
- "type"
21
- ],
22
- "homepage": "https://github.com/sefinek24/random-emoji#readme",
23
- "bugs": {
24
- "url": "https://github.com/sefinek24/random-emoji/issues"
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/sefinek24/random-emoji.git"
29
- },
30
- "license": "MIT",
31
- "author": "Sefinek <contact@sefinek.net> (https://sefinek.net)",
32
- "main": "index.js",
33
- "types": "./index.d.ts",
34
- "directories": {
35
- "data": "data"
36
- },
37
- "files": [
38
- "data/",
39
- "example.js",
40
- "index.d.ts",
41
- "index.js",
42
- "LICENSE",
43
- "README.md"
44
- ],
45
- "scripts": {
46
- "test": "node example.js"
47
- }
48
- }
1
+ {
2
+ "name": "@sefinek/random-emoji",
3
+ "version": "2.0.4",
4
+ "description": "A module providing various random emoticons along with their names and types. Additionally, it also includes random kaomoji.",
5
+ "keywords": [
6
+ "random",
7
+ "emoji",
8
+ "emojis",
9
+ "emoticon",
10
+ "unicode",
11
+ "cat",
12
+ "cats",
13
+ "heart",
14
+ "hearts",
15
+ "food",
16
+ "foods",
17
+ "circle",
18
+ "circles",
19
+ "name",
20
+ "type"
21
+ ],
22
+ "homepage": "https://github.com/sefinek24/random-emoji#readme",
23
+ "bugs": {
24
+ "url": "https://github.com/sefinek24/random-emoji/issues"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/sefinek24/random-emoji.git"
29
+ },
30
+ "license": "MIT",
31
+ "author": "Sefinek <contact@sefinek.net> (https://sefinek.net)",
32
+ "main": "index.js",
33
+ "types": "./index.d.ts",
34
+ "directories": {
35
+ "data": "data"
36
+ },
37
+ "files": [
38
+ "data/",
39
+ "example.js",
40
+ "index.d.ts",
41
+ "index.js",
42
+ "LICENSE",
43
+ "README.md"
44
+ ],
45
+ "scripts": {
46
+ "test": "node example.js"
47
+ }
48
+ }