@onurege3467/zerohelper 2.1.2 โ†’ 3.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onurege3467/zerohelper",
3
- "version": "2.1.2",
3
+ "version": "3.1.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "node test.js"
@@ -12,22 +12,29 @@
12
12
  "uuid",
13
13
  "mongodb",
14
14
  "mysql",
15
- "db",
16
15
  "jsondatabase",
17
- "sqlitedatabase",
18
16
  "sqlite3",
19
- "quick.db"
17
+ "quick.db",
18
+ "postgresql",
19
+ "redis",
20
+ "utility",
21
+ "functions",
22
+ "nodejs"
20
23
  ],
21
24
  "author": "Onure9e",
22
25
  "license": "ISC",
26
+ "description": "ZeroHelper is a versatile JavaScript library offering helper functions and database utilities for developers. It supports MongoDB, MySQL, SQLite, Redis, and PostgreSQL.",
23
27
  "dependencies": {
24
- "dotenv": "^16.4.7",
28
+ "bcrypt": "^5.1.1",
29
+ "crypto": "^1.0.1",
25
30
  "fs": "^0.0.1-security",
31
+ "jsonwebtoken": "^9.0.2",
26
32
  "lodash": "^4.17.21",
27
33
  "mongodb": "^6.12.0",
28
34
  "path": "^0.12.7",
35
+ "pg": "^8.14.1",
29
36
  "promise-mysql": "^5.2.0",
37
+ "redis": "^4.7.0",
30
38
  "sqlite3": "^5.1.7"
31
- },
32
- "description": ""
33
- }
39
+ }
40
+ }
package/readme.md CHANGED
@@ -1,90 +1,221 @@
1
- # ZeroHelper
1
+ # ZeroHelper ๐Ÿš€
2
2
 
3
- ZeroHelper is a package with database and some functions.
3
+ ZeroHelper is a versatile JavaScript package providing helper functions and database utilities for developers. It includes essential tools for manipulating data, generating random values, performing cryptographic operations, and interacting with various databases like MySQL, MongoDB, PostgreSQL, SQLite, and Redis.
4
4
 
5
- ## Installing ZeroHelper
5
+ ---
6
+
7
+ ## ๐Ÿ“‘ Table of Contents
8
+
9
+ 1. [๐Ÿ“ฆ Installation](#-installation)
10
+ 2. [โœจ Helper Functions](#-helper-functions)
11
+ - [๐ŸŽฒ Random Functions](#random-functions-)
12
+ - [๐Ÿ”  String Functions](#string-functions-)
13
+ - [๐Ÿ“Š Array Functions](#array-functions-)
14
+ - [๐Ÿ”ง Object Functions](#object-functions-)
15
+ - [๐Ÿ”’ Crypto Functions](#crypto-functions-)
16
+ - [โž— Math Functions](#math-functions-)
17
+ 3. [๐Ÿ’พ Database Utilities](#-database-utilities)
18
+ - [๐Ÿ—ƒ๏ธ JsonDatabase](#jsondatabase-๏ธ)
19
+ - [๐Ÿ—„๏ธ MongoDB](#mongodb-๏ธ)
20
+ - [๐Ÿฌ MySQL](#mysql-)
21
+ - [๐Ÿ“ฑ SQLiteDB](#sqlitedb-)
22
+ - [๐Ÿ‡ PostgreSQL](#postgresql-)
23
+ - [โšก Redis](#redis-)
24
+
25
+ ---
26
+
27
+ ## ๐Ÿš€ Installing ZeroHelper
28
+
29
+ To install ZeroHelper, use npm:
6
30
 
7
31
  ```bash
8
32
  npm i @onurege3467/zerohelper
9
33
  ```
10
34
 
11
- ## Using ZeroHelper for helper functions
35
+ ## ๐Ÿ› ๏ธ Using ZeroHelper for helper functions
36
+
37
+ # Random Functions ๐ŸŽฒ
38
+
39
+ ```js
40
+ const helpers = require("@onurege3467/zerohelper/functions");
41
+
42
+ const id = helpers.random.makeUniqueId();
43
+ console.log(id); // Example: "lzx8k9x8k9"
44
+
45
+ const item = helpers.random.randomArray([1, 2, 3, 4, 5]);
46
+ console.log(item); // Example: 3
47
+
48
+ const text = helpers.random.randomText(10);
49
+ console.log(text); // Example: "aBcDeFgHiJ"
50
+
51
+ const number = helpers.random.randomNumber(1, 100);
52
+ console.log(number); // Example: 42
53
+
54
+ const emoji = helpers.random.randomEmoji();
55
+ console.log(emoji); // Example: "๐Ÿ˜„"
56
+
57
+ const hex = helpers.random.randomHex();
58
+ console.log(hex); // Example: "#A1B2C3"
59
+
60
+ const float = helpers.random.randomFloat(1.5, 5.5);
61
+ console.log(float); // Example: 3.14
62
+ ```
63
+
64
+ # String Functions ๐Ÿ” 
12
65
 
13
66
  ```js
14
- var { functions } = require("@onurege3467/zerohelper");
15
-
16
- console.log(functions.makeUniqueId()); // returns like this m63ku5dsi45hppk24i
17
- console.log(functions.uid.uuid()); // returns a uuid like 280fbb78-913a-4694-9b7b-f44eb74deb28
18
- console.log(functions.uid.isUUID("some text")); // returns true or false
19
- console.log(functions.randomArray([1, 2, 3, 4, 5])); // selects random variable in this array
20
- console.log(functions.randomEmoji()); // returns a random emoji
21
- console.log(functions.randomHex()); // returns a random hex code
22
- console.log(functions.randomNumber()); // returns random number
23
- console.log(functions.randomText()); // returns random text
24
- console.log(functions.shuffleArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])); // returns shuffled array like [3,5,2,1,7,6,8,9,0]
25
- console.log(functions.titleCase("HellO tHis iS DEMO teXt")); // returns Hello This Is Demo Text
67
+ const title = helpers.string.titleCase("hello world");
68
+ console.log(title); // "Hello World"
69
+
70
+ const randomString = helpers.string.generateRandomString(8);
71
+ console.log(randomString); // Example: "AbCdEfGh"
26
72
  ```
27
73
 
28
- ## Using ZeroHelper As Database
74
+ # Array Functions ๐Ÿ“Š
29
75
 
30
- ZeroHelper's database is divided into 3 parts.
76
+ ```js
77
+ const shuffled = helpers.array.shuffleArray([1, 2, 3, 4, 5]);
78
+ console.log(shuffled); // Example: [3, 1, 5, 4, 2]
79
+
80
+ const flat = helpers.array.flattenArray([1, [2, [3, 4]], 5]);
81
+ console.log(flat); // [1, 2, 3, 4, 5]
82
+
83
+ const filtered = helpers.array.removeFalsyValues([0, 1, false, 2, "", 3]);
84
+ console.log(filtered); // [1, 2, 3]
85
+
86
+ const grouped = helpers.array.groupBy(
87
+ [
88
+ { category: "fruit", name: "apple" },
89
+ { category: "fruit", name: "banana" },
90
+ { category: "vegetable", name: "carrot" },
91
+ ],
92
+ "category"
93
+ );
94
+ console.log(grouped);
95
+ // {
96
+ // fruit: [{ category: "fruit", name: "apple" }, { category: "fruit", name: "banana" }],
97
+ // vegetable: [{ category: "vegetable", name: "carrot" }]
98
+ // }
99
+
100
+ const names = helpers.array.pluck(
101
+ [{ name: "Alice" }, { name: "Bob" }, { name: "Charlie" }],
102
+ "name"
103
+ );
104
+ console.log(names); // ["Alice", "Bob", "Charlie"]
105
+
106
+ const sorted = helpers.array.sortBy(
107
+ [{ age: 30 }, { age: 20 }, { age: 40 }],
108
+ "age"
109
+ );
110
+ console.log(sorted); // [{ age: 20 }, { age: 30 }, { age: 40 }]
111
+ ```
31
112
 
32
- ### Firtst Step
113
+ # Object Functions ๐Ÿ”ง
33
114
 
34
115
  ```js
35
- const zerohelper = require("@onurege3467/zerohelper"); // if you don't do this the functions may crush
116
+ const filtered = helpers.object.filterObjectByKey(
117
+ { name: "Alice", age: 25, city: "New York" },
118
+ ["name", "city"]
119
+ );
120
+ console.log(filtered); // { name: "Alice", city: "New York" }
121
+
122
+ const merged = helpers.object.deepMerge(
123
+ { a: 1, b: { c: 2 } },
124
+ { b: { d: 3 }, e: 4 }
125
+ );
126
+ console.log(merged); // { a: 1, b: { c: 2, d: 3 }, e: 4 }
36
127
  ```
37
128
 
38
- ### 1. JsonDatabase
129
+ # Crypto Functions ๐Ÿ”’
39
130
 
40
131
  ```js
41
- const JsonDatabase = require("@onurege3467/zerohelper/database/jsondatabase");
42
- const db = new JsonDatabase();
132
+ const secret = "mySecretKey";
133
+ const encrypted = helpers.crypto.encryptText("Hello, World!", secret);
134
+ console.log(encrypted); // Encrypted text
43
135
 
44
- db.set("foo", "bar"); // sets foo to bar
45
- db.push("array", "x"); // pushs x to array
46
- db.delete("foo"); // deletes foo
136
+ const decrypted = helpers.crypto.decryptText(encrypted, secret);
137
+ console.log(decrypted); // "Hello, World!"
47
138
 
48
- db.add("number", 1); // adds 1 to number
49
- db.sub("number", 1); // subtracts 1 from number
139
+ const hash = helpers.crypto.hashPassword("myPassword");
140
+ console.log(hash); // Hashed password
50
141
 
51
- db.get("foo"); // gets foo value
52
- db.has("foo"); // returns true or false
142
+ const isValid = helpers.crypto.verifyPassword("myPassword", hash);
143
+ console.log(isValid); // true or false
144
+
145
+ const token = helpers.crypto.generateJWT({ userId: 1 }, "mySecret");
146
+ console.log(token); // JWT
147
+
148
+ const payload = helpers.crypto.verifyJWT(token, "mySecret");
149
+ console.log(payload); // { userId: 1, iat: ..., exp: ... }
150
+ ```
151
+
152
+ # Math Functions โž—
153
+
154
+ ```js
155
+ const avg = helpers.math.mean([1, 2, 3, 4, 5]);
156
+ console.log(avg); // 3
157
+
158
+ const prime = helpers.math.isPrime(7);
159
+ console.log(prime); // true
53
160
  ```
54
161
 
55
- ### 2. MongoDB
162
+ ## ๐Ÿ’พ Using ZeroHelper as Database
163
+
164
+ ZeroHelper provides multiple database utilities for seamless integration with various databases.
165
+
166
+ # JsonDatabase ๐Ÿ—ƒ๏ธ
167
+
168
+ ```js
169
+ (async function () {
170
+ const JsonDatabase = require("@onurege3467/zerohelper/database/jsondatabase");
171
+ const db = new JsonDatabase();
172
+
173
+ await db.set("foo", "bar");
174
+ await db.push("array", "x");
175
+ await db.delete("foo");
176
+
177
+ await db.add("number", 1);
178
+ await db.sub("number", 1);
179
+
180
+ await console.log(db.get("foo"));
181
+ await console.log(db.has("foo"));
182
+ })();
183
+ ```
184
+
185
+ # MongoDB ๐Ÿ—„๏ธ
56
186
 
57
187
  ```js
58
188
  (async function () {
59
189
  const MongoDB = require("@onurege3467/zerohelper/database/mongodb");
60
- var db = await MongoDB.createData(
190
+ const db = await MongoDB.createData(
61
191
  "database",
62
192
  "collection",
63
193
  "data",
64
194
  undefined,
65
195
  "mongourl"
66
196
  );
67
- db.set("foo", "bar"); // sets foo to bar
68
- db.push("array", "x"); // pushs x to array
69
- db.delete("foo"); // deletes foo
70
197
 
71
- db.add("number", 1); // adds 1 to number
72
- db.sub("number", 1); // subtracts 1 from number
198
+ await db.set("foo", "bar");
199
+ await db.push("array", "x");
200
+ await db.delete("foo");
201
+
202
+ await db.add("number", 1);
203
+ await db.sub("number", 1);
73
204
 
74
- db.get("foo"); // gets foo value
75
- db.has("foo"); // returns true or false
205
+ console.log(await db.get("foo"));
206
+ console.log(await db.has("foo"));
76
207
 
77
- db.ping(); // returns database ping
208
+ console.log(await db.ping());
78
209
  })();
79
210
  ```
80
211
 
81
- ### 3. MySQL
212
+ # MySQL ๐Ÿฌ
82
213
 
83
214
  ```js
84
215
  (async function () {
85
- const mysql = require("@onurege3467/zerohelper/database/mysql");
216
+ const MySQL = require("@onurege3467/zerohelper/database/mysql");
86
217
 
87
- const db = new mysql();
218
+ const db = new MySQL();
88
219
  await db.connect({
89
220
  host: "localhost",
90
221
  port: "3306",
@@ -94,42 +225,141 @@ db.has("foo"); // returns true or false
94
225
  charset: "utf8mb4",
95
226
  });
96
227
 
97
- db.on("connected", async (connection) => {
228
+ db.on("connected", async () => {
98
229
  console.log("Database Connected");
99
230
  });
100
231
 
101
- db.set("table", "foo", "bar"); // sets foo to bar
102
- db.push("table", "array", "x"); // pushs x to array
103
- db.delete("table", "foo"); // deletes foo
232
+ await db.set("key", "value"); // Uses the default table
233
+ await db.set("key", "value", "custom_table"); // Uses the specified table
104
234
 
105
- db.add("table", "number", 1); // adds 1 to number
106
- db.sub("table", "number", 1); // subtracts 1 from number
235
+ const value = await db.get("key"); // Uses the default table
236
+ const valueInCustomTable = await db.get("key", "custom_table"); // Uses the specified table
107
237
 
108
- db.get("table", "foo"); // gets foo value
109
- db.has("table", "foo"); // returns true or false
238
+ await db.add("count", 10); // Uses the default table
239
+ await db.add("count", 10, "custom_table"); // Uses the specified table
110
240
 
111
- db.ping(); // returns database ping
241
+ await db.sub("count", 5); // Uses the default table
242
+ await db.sub("count", 5, "custom_table"); // Uses the specified table
243
+
244
+ await db.push("array", "value"); // Uses the default table
245
+ await db.push("array", "value", "custom_table"); // Uses the specified table
246
+
247
+ await db.pull("array", "value"); // Uses the default table
248
+ await db.pull("array", "value", "custom_table"); // Uses the specified table
249
+
250
+ await db.delete("key"); // Uses the default table
251
+ await db.delete("key", "custom_table"); // Uses the specified table
252
+
253
+ const exists = await db.exists("key"); // Uses the default table
254
+ const existsInCustomTable = await db.exists("key", "custom_table"); // Uses the specified table
255
+
256
+ const includes = await db.includes("array", "value"); // Uses the default table
257
+ const includesInCustomTable = await db.includes(
258
+ "array",
259
+ "value",
260
+ "custom_table"
261
+ ); // Uses the specified table
262
+
263
+ const allData = await db.all(); // Uses the default table
264
+ const allDataInCustomTable = await db.all("custom_table"); // Uses the specified table
265
+
266
+ await db.clear(); // Clears the default table
267
+ await db.clear("custom_table"); // Clears the specified table
268
+
269
+ await db.drop(); // Drops the default table
270
+ await db.drop("custom_table"); // Drops the specified table
271
+
272
+ await db.rename("old_table", "new_table");
273
+
274
+ const ping = await db.ping();
275
+ console.log(`Ping: ${ping}ms`);
276
+
277
+ // Sets MySQL global variables
278
+ await db.variables({
279
+ max_connections: 100000,
280
+ wait_timeout: 60,
281
+ });
112
282
  })();
113
283
  ```
114
284
 
115
- ### 3. SQLiteDB
285
+ # SQLiteDB ๐Ÿ“ฑ
116
286
 
117
287
  ```js
118
288
  (async function () {
119
- const SQLDB = require("@onurege3467/zerohelper/database/sqldb");
289
+ const SQLiteDB = require("@onurege3467/zerohelper/database/sqldb");
290
+
291
+ const db = new SQLiteDB();
292
+
293
+ await db.set("foo", "bar");
294
+ await db.push("array", "x");
295
+ await db.delete("foo");
296
+
297
+ await db.add("number", 1);
298
+ await db.sub("number", 1);
299
+
300
+ console.log(await db.get("foo"));
301
+ console.log(await db.has("foo"));
302
+ })();
303
+ ```
304
+
305
+ # PostgreSQL ๐Ÿ‡
306
+
307
+ ```js
308
+ (async function () {
309
+ const PostgreSQL = require("@onurege3467/zerohelper/database/postgresql");
310
+
311
+ const db = new PostgreSQL({
312
+ user: "your_username",
313
+ host: "localhost",
314
+ database: "your_database",
315
+ password: "your_password",
316
+ port: 5432,
317
+ });
318
+
319
+ await db.set("foo", "bar");
320
+ console.log(await db.get("foo"));
321
+ console.log(await db.has("foo"));
322
+ await db.delete("foo");
323
+
324
+ await db.add("number", 10);
325
+ await db.sub("number", 5);
326
+
327
+ await db.set("array", []);
328
+ await db.push("array", "value");
329
+ console.log(await db.get("array"));
330
+
331
+ console.log(await db.ping());
332
+
333
+ await db.close();
334
+ })();
335
+ ```
336
+
337
+ # Redis โšก
338
+
339
+ ```js
340
+ (async function () {
341
+ const RedisDatabase = require("@onurege3467/zerohelper/database/redis");
342
+
343
+ const db = new RedisDatabase({
344
+ url: "redis://localhost:6379",
345
+ });
346
+
347
+ await db.connect();
120
348
 
121
- const db = new SQLDB();
349
+ await db.set("user.name", "John Doe");
350
+ console.log(await db.get("user.name"));
351
+ console.log(await db.has("user.name"));
352
+ await db.delete("user.name");
122
353
 
123
- await db.initialize();
354
+ await db.add("stats.score", 10);
355
+ await db.sub("stats.score", 5);
124
356
 
125
- db.set("table", "foo", "bar"); // sets foo to bar
126
- db.push("table", "array", "x"); // pushs x to array
127
- db.delete("table", "foo"); // deletes foo
357
+ await db.set("items", []);
358
+ await db.push("items", "item1");
359
+ console.log(await db.get("items"));
128
360
 
129
- db.add("table", "number", 1); // adds 1 to number
130
- db.sub("table", "number", 1); // subtracts 1 from number
361
+ console.log(await db.ping());
131
362
 
132
- db.get("table", "foo"); // gets foo value
133
- db.has("table", "foo"); // returns true or false
363
+ await db.close();
134
364
  })();
135
365
  ```
package/database/test.js DELETED
@@ -1,50 +0,0 @@
1
- require("dotenv").config();
2
- const runMongoDB = async () => {
3
- const { MongoDB } = require("./index");
4
-
5
- var db = await MongoDB.createData(
6
- "database",
7
- "collection",
8
- "data",
9
- undefined,
10
- "mongourl"
11
- );
12
-
13
- db.set("foo", "bar");
14
- };
15
-
16
- const runMySQL = async () => {
17
- const { MySQLDatabase } = require("./index");
18
- const db = new MySQLDatabase();
19
- await db.connect({
20
- host: "localhost",
21
- port: "3306",
22
- user: "root",
23
- password: "",
24
- database: "database",
25
- charset: "utf8mb4",
26
- });
27
-
28
- db.on("connected", async (connection) => {
29
- console.log("Database Connected");
30
- });
31
-
32
- db.set("table", "foo", "bar");
33
- };
34
-
35
- //runMySQL()
36
-
37
- const runJsonDatabase = async () => {
38
- const { JsonDatabase } = require("./index");
39
- var db = new JsonDatabase();
40
- db.set("foo", "bar");
41
- };
42
-
43
- const runSQLite = async () => {
44
- const { database } = require("../index");
45
- var db = new database.SQLiteDatabase();
46
- await db.set("foo.test2", { Date: Date.now(), name: "Onur" });
47
- console.log(await db.has("foo.test2.a"));
48
- };
49
-
50
- runSQLite();
@@ -1,100 +0,0 @@
1
- function makeUniqueId() {
2
- return Date.now().toString(36) + Math.random().toString(36).substr(2);
3
- }
4
-
5
- function randomArray(arr) {
6
- var random1 = Math.floor(Math.random() * (arr.length - 0 + 0) + 0);
7
- var random = arr[random1];
8
- return random;
9
- }
10
- function randomText(length) {
11
- if (!length) length = 8;
12
- var result = "";
13
- var characters =
14
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
15
- var charactersLength = characters.length;
16
- for (var i = 0; i < length; i++) {
17
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
18
- }
19
- return result;
20
- }
21
- function randomNumber(bas, son) {
22
- if (!bas) bas = 0;
23
- if (!son) son = 9999999;
24
- return Math.floor(Math.random() * (son - bas + 1)) + bas;
25
- }
26
- function randomEmoji() {
27
- var emojiler = ['๐Ÿ˜„','๐Ÿ˜ƒ','๐Ÿ˜€','๐Ÿ˜Š','โ˜บ','๐Ÿ˜‰','๐Ÿ˜','๐Ÿ˜˜','๐Ÿ˜š','๐Ÿ˜—','๐Ÿ˜™','๐Ÿ˜œ','๐Ÿ˜','๐Ÿ˜›','๐Ÿ˜ณ','๐Ÿ˜','๐Ÿ˜”','๐Ÿ˜Œ','๐Ÿ˜’','๐Ÿ˜ž','๐Ÿ˜ฃ','๐Ÿ˜ข','๐Ÿ˜‚','๐Ÿ˜ญ','๐Ÿ˜ช','๐Ÿ˜ฅ','๐Ÿ˜ฐ','๐Ÿ˜…','๐Ÿ˜“','๐Ÿ˜ฉ','๐Ÿ˜ซ','๐Ÿ˜จ','๐Ÿ˜ฑ','๐Ÿ˜ ','๐Ÿ˜ก','๐Ÿ˜ค','๐Ÿ˜–','๐Ÿ˜†','๐Ÿ˜‹','๐Ÿ˜ท','๐Ÿ˜Ž','๐Ÿ˜ด','๐Ÿ˜ต','๐Ÿ˜ฒ','๐Ÿ˜Ÿ','๐Ÿ˜ฆ','๐Ÿ˜ง','๐Ÿ˜ˆ','๐Ÿ‘ฟ','๐Ÿ˜ฎ','๐Ÿ˜ฌ','๐Ÿ˜','๐Ÿ˜•','๐Ÿ˜ฏ','๐Ÿ˜ถ','๐Ÿ˜‡','๐Ÿ˜','๐Ÿ˜‘','๐Ÿ‘ฒ','๐Ÿ‘ณ','๐Ÿ‘ฎ','๐Ÿ‘ท','๐Ÿ’‚','๐Ÿ‘ถ','๐Ÿ‘ฆ','๐Ÿ‘ง','๐Ÿ‘จ','๐Ÿ‘ฉ','๐Ÿ‘ด','๐Ÿ‘ต','๐Ÿ‘ฑ','๐Ÿ‘ผ','๐Ÿ‘ธ','๐Ÿ˜บ','๐Ÿ˜ธ','๐Ÿ˜ป','๐Ÿ˜ฝ','๐Ÿ˜ผ','๐Ÿ™€','๐Ÿ˜ฟ','๐Ÿ˜น','๐Ÿ˜พ','๐Ÿ‘น','๐Ÿ‘บ','๐Ÿ™ˆ','๐Ÿ™‰','๐Ÿ™Š','๐Ÿ’€','๐Ÿ‘ฝ','๐Ÿ’ฉ','๐Ÿ”ฅ','โœจ','๐ŸŒŸ','๐Ÿ’ซ','๐Ÿ’ฅ','๐Ÿ’ข','๐Ÿ’ฆ','๐Ÿ’ง','๐Ÿ’ค','๐Ÿ’จ','๐Ÿ‘‚','๐Ÿ‘€','๐Ÿ‘ƒ','๐Ÿ‘…','๐Ÿ‘„','๐Ÿ‘','๐Ÿ‘Ž','๐Ÿ‘Œ','๐Ÿ‘Š','โœŠ','โœŒ','๐Ÿ‘‹','โœ‹','๐Ÿ‘','๐Ÿ‘†','๐Ÿ‘‡','๐Ÿ‘‰','๐Ÿ‘ˆ','๐Ÿ™Œ','๐Ÿ™','โ˜','๐Ÿ‘','๐Ÿ’ช','๐Ÿšถ','๐Ÿƒ','๐Ÿ’ƒ','๐Ÿ‘ซ','๐Ÿ‘ช','๐Ÿ‘ฌ','๐Ÿ‘ญ','๐Ÿ’','๐Ÿ’‘','๐Ÿ‘ฏ','๐Ÿ™†','๐Ÿ™…','๐Ÿ’','๐Ÿ™‹','๐Ÿ’†','๐Ÿ’‡','๐Ÿ’…','๐Ÿ‘ฐ','๐Ÿ™Ž','๐Ÿ™','๐Ÿ™‡','๐ŸŽฉ','๐Ÿ‘‘','๐Ÿ‘’','๐Ÿ‘Ÿ','๐Ÿ‘ž','๐Ÿ‘ก','๐Ÿ‘ ','๐Ÿ‘ข','๐Ÿ‘•','๐Ÿ‘”','๐Ÿ‘š','๐Ÿ‘—','๐ŸŽฝ','๐Ÿ‘–','๐Ÿ‘˜','๐Ÿ‘™','๐Ÿ’ผ','๐Ÿ‘œ','๐Ÿ‘','๐Ÿ‘›','๐Ÿ‘“','๐ŸŽ€','๐ŸŒ‚','๐Ÿ’„','๐Ÿ’›','๐Ÿ’™','๐Ÿ’œ','๐Ÿ’š','โค','๐Ÿ’”','๐Ÿ’—','๐Ÿ’“','๐Ÿ’•','๐Ÿ’–','๐Ÿ’ž','๐Ÿ’˜','๐Ÿ’Œ','๐Ÿ’‹','๐Ÿ’','๐Ÿ’Ž','๐Ÿ‘ค','๐Ÿ‘ฅ','๐Ÿ’ฌ','๐Ÿ‘ฃ','๐Ÿ’ญ','๐Ÿถ','๐Ÿบ','๐Ÿฑ','๐Ÿญ','๐Ÿน','๐Ÿฐ','๐Ÿธ','๐Ÿฏ','๐Ÿจ','๐Ÿป','๐Ÿท','๐Ÿฝ','๐Ÿฎ','๐Ÿ—','๐Ÿต','๐Ÿ’','๐Ÿด','๐Ÿ‘','๐Ÿ˜','๐Ÿผ','๐Ÿง','๐Ÿฆ','๐Ÿค','๐Ÿฅ','๐Ÿฃ','๐Ÿ”','๐Ÿ','๐Ÿข','๐Ÿ›','๐Ÿ','๐Ÿœ','๐Ÿž','๐ŸŒ','๐Ÿ™','๐Ÿš','๐Ÿ ','๐ŸŸ','๐Ÿฌ','๐Ÿณ','๐Ÿ‹','๐Ÿ„','๐Ÿ','๐Ÿ€','๐Ÿƒ','๐Ÿ…','๐Ÿ‡','๐Ÿ‰','๐ŸŽ','๐Ÿ','๐Ÿ“','๐Ÿ•','๐Ÿ–','๐Ÿ','๐Ÿ‚','๐Ÿฒ','๐Ÿก','๐ŸŠ','๐Ÿซ','๐Ÿช','๐Ÿ†','๐Ÿˆ','๐Ÿฉ','๐Ÿพ','๐Ÿ’','๐ŸŒธ','๐ŸŒท','๐Ÿ€','๐ŸŒน','๐ŸŒป','๐ŸŒบ','๐Ÿ','๐Ÿƒ','๐Ÿ‚','๐ŸŒฟ','๐ŸŒพ','๐Ÿ„','๐ŸŒต','๐ŸŒด','๐ŸŒฒ','๐ŸŒณ','๐ŸŒฐ','๐ŸŒฑ','๐ŸŒผ','๐ŸŒ','๐ŸŒž','๐ŸŒ','๐ŸŒš','๐ŸŒ‘','๐ŸŒ’','๐ŸŒ“','๐ŸŒ”','๐ŸŒ•','๐ŸŒ–','๐ŸŒ—','๐ŸŒ˜','๐ŸŒœ','๐ŸŒ›','๐ŸŒ™','๐ŸŒ','๐ŸŒŽ','๐ŸŒ','๐ŸŒ‹','๐ŸŒŒ','๐ŸŒ ','โญ','โ˜€','โ›…','โ˜','โšก','โ˜”','โ„','โ›„','๐ŸŒ€','๐ŸŒ','๐ŸŒˆ','๐ŸŒŠ','๐ŸŽ','๐Ÿ’','๐ŸŽŽ','๐ŸŽ’','๐ŸŽ“','๐ŸŽ','๐ŸŽ†','๐ŸŽ‡','๐ŸŽ','๐ŸŽ‘','๐ŸŽƒ','๐Ÿ‘ป','๐ŸŽ…','๐ŸŽ„','๐ŸŽ','๐ŸŽ‹','๐ŸŽ‰','๐ŸŽŠ','๐ŸŽˆ','๐ŸŽŒ','๐Ÿ”ฎ','๐ŸŽฅ','๐Ÿ“ท','๐Ÿ“น','๐Ÿ“ผ','๐Ÿ’ฟ','๐Ÿ“€','๐Ÿ’ฝ','๐Ÿ’พ','๐Ÿ’ป','๐Ÿ“ฑ','โ˜Ž','๐Ÿ“ž','๐Ÿ“Ÿ','๐Ÿ“ ','๐Ÿ“ก','๐Ÿ“บ','๐Ÿ“ป','๐Ÿ”Š','๐Ÿ”‰','๐Ÿ”ˆ','๐Ÿ”‡','๐Ÿ””','๐Ÿ”•','๐Ÿ“ข','๐Ÿ“ฃ','โณ','โŒ›','โฐ','โŒš','๐Ÿ”“','๐Ÿ”’','๐Ÿ”','๐Ÿ”','๐Ÿ”‘','๐Ÿ”Ž','๐Ÿ’ก','๐Ÿ”ฆ','๐Ÿ”†','๐Ÿ”…','๐Ÿ”Œ','๐Ÿ”‹','๐Ÿ”','๐Ÿ›','๐Ÿ›€','๐Ÿšฟ','๐Ÿšฝ','๐Ÿ”ง','๐Ÿ”ฉ','๐Ÿ”จ','๐Ÿšช','๐Ÿšฌ','๐Ÿ’ฃ','๐Ÿ”ซ','๐Ÿ”ช','๐Ÿ’Š','๐Ÿ’‰','๐Ÿ’ฐ','๐Ÿ’ด','๐Ÿ’ต','๐Ÿ’ท','๐Ÿ’ถ','๐Ÿ’ณ','๐Ÿ’ธ','๐Ÿ“ฒ','๐Ÿ“ง','๐Ÿ“ฅ','๐Ÿ“ค','โœ‰','๐Ÿ“ฉ','๐Ÿ“จ','๐Ÿ“ฏ','๐Ÿ“ซ','๐Ÿ“ช','๐Ÿ“ฌ','๐Ÿ“ญ','๐Ÿ“ฎ','๐Ÿ“ฆ','๐Ÿ“','๐Ÿ“„','๐Ÿ“ƒ','๐Ÿ“‘','๐Ÿ“Š','๐Ÿ“ˆ','๐Ÿ“‰','๐Ÿ“œ','๐Ÿ“‹','๐Ÿ“…','๐Ÿ“†','๐Ÿ“‡','๐Ÿ“','๐Ÿ“‚','โœ‚','๐Ÿ“Œ','๐Ÿ“Ž','โœ’','โœ','๐Ÿ“','๐Ÿ“','๐Ÿ“•','๐Ÿ“—','๐Ÿ“˜','๐Ÿ“™','๐Ÿ““','๐Ÿ“”','๐Ÿ“’','๐Ÿ“š','๐Ÿ“–','๐Ÿ”–','๐Ÿ“›','๐Ÿ”ฌ','๐Ÿ”ญ','๐Ÿ“ฐ','๐ŸŽจ','๐ŸŽฌ','๐ŸŽค','๐ŸŽง','๐ŸŽผ','๐ŸŽต','๐ŸŽถ','๐ŸŽน','๐ŸŽป','๐ŸŽบ','๐ŸŽท','๐ŸŽธ','๐Ÿ‘พ','๐ŸŽฎ','๐Ÿƒ','๐ŸŽด','๐Ÿ€„','๐ŸŽฒ','๐ŸŽฏ','๐Ÿˆ','๐Ÿ€','โšฝ','โšพ','๐ŸŽพ','๐ŸŽฑ','๐Ÿ‰','๐ŸŽณ','โ›ณ','๐Ÿšต','๐Ÿšด','๐Ÿ','๐Ÿ‡','๐Ÿ†','๐ŸŽฟ','๐Ÿ‚','๐ŸŠ','๐Ÿ„','๐ŸŽฃ','โ˜•','๐Ÿต','๐Ÿถ','๐Ÿผ','๐Ÿบ','๐Ÿป','๐Ÿธ','๐Ÿน','๐Ÿท','๐Ÿด','๐Ÿ•','๐Ÿ”','๐ŸŸ','๐Ÿ—','๐Ÿ–','๐Ÿ','๐Ÿ›','๐Ÿค','๐Ÿฑ','๐Ÿฃ','๐Ÿฅ','๐Ÿ™','๐Ÿ˜','๐Ÿš','๐Ÿœ','๐Ÿฒ','๐Ÿข','๐Ÿก','๐Ÿณ','๐Ÿž','๐Ÿฉ','๐Ÿฎ','๐Ÿฆ','๐Ÿจ','๐Ÿง','๐ŸŽ‚','๐Ÿฐ','๐Ÿช','๐Ÿซ','๐Ÿฌ','๐Ÿญ','๐Ÿฏ','๐ŸŽ','๐Ÿ','๐ŸŠ','๐Ÿ‹','๐Ÿ’','๐Ÿ‡','๐Ÿ‰','๐Ÿ“','๐Ÿ‘','๐Ÿˆ','๐ŸŒ','๐Ÿ','๐Ÿ','๐Ÿ ','๐Ÿ†','๐Ÿ…','๐ŸŒฝ','๐Ÿ ','๐Ÿก','๐Ÿซ','๐Ÿข','๐Ÿฃ','๐Ÿฅ','๐Ÿฆ','๐Ÿช','๐Ÿฉ','๐Ÿจ','๐Ÿ’’','โ›ช','๐Ÿฌ','๐Ÿค','๐ŸŒ‡','๐ŸŒ†','๐Ÿฏ','๐Ÿฐ','โ›บ','๐Ÿญ','๐Ÿ—ผ','๐Ÿ—พ','๐Ÿ—ป','๐ŸŒ„','๐ŸŒ…','๐ŸŒƒ','๐Ÿ—ฝ','๐ŸŒ‰','๐ŸŽ ','๐ŸŽก','โ›ฒ','๐ŸŽข','๐Ÿšข','โ›ต','๐Ÿšค','๐Ÿšฃ','โš“','๐Ÿš€','โœˆ','๐Ÿ’บ','๐Ÿš','๐Ÿš‚','๐ŸšŠ','๐Ÿš‰','๐Ÿšž','๐Ÿš†','๐Ÿš„','๐Ÿš…','๐Ÿšˆ','๐Ÿš‡','๐Ÿš','๐Ÿš‹','๐Ÿšƒ','๐ŸšŽ','๐ŸšŒ','๐Ÿš','๐Ÿš™','๐Ÿš˜','๐Ÿš—','๐Ÿš•','๐Ÿš–','๐Ÿš›','๐Ÿšš','๐Ÿšจ','๐Ÿš“','๐Ÿš”','๐Ÿš’','๐Ÿš‘','๐Ÿš','๐Ÿšฒ','๐Ÿšก','๐ŸšŸ','๐Ÿš ','๐Ÿšœ','๐Ÿ’ˆ','๐Ÿš','๐ŸŽซ','๐Ÿšฆ','๐Ÿšฅ','โš ','๐Ÿšง','๐Ÿ”ฐ','โ›ฝ','๐Ÿฎ','๐ŸŽฐ','โ™จ','๐Ÿ—ฟ','๐ŸŽช','๐ŸŽญ','๐Ÿ“','๐Ÿšฉ','โฌ†','โฌ‡','โฌ…','โžก','๐Ÿ” ','๐Ÿ”ก','๐Ÿ”ค','โ†—','โ†–','โ†˜','โ†™','โ†”','โ†•','๐Ÿ”„','โ—€','โ–ถ','๐Ÿ”ผ','๐Ÿ”ฝ','โ†ฉ','โ†ช','โ„น','โช','โฉ','โซ','โฌ','โคต','โคด','๐Ÿ†—','๐Ÿ”€','๐Ÿ”','๐Ÿ”‚','๐Ÿ†•','๐Ÿ†™','๐Ÿ†’','๐Ÿ†“','๐Ÿ†–','๐Ÿ“ถ','๐ŸŽฆ','๐Ÿˆ','๐Ÿˆฏ','๐Ÿˆณ','๐Ÿˆต','๐Ÿˆด','๐Ÿˆฒ','๐Ÿ‰','๐Ÿˆน','๐Ÿˆบ','๐Ÿˆถ','๐Ÿˆš','๐Ÿšป','๐Ÿšน','๐Ÿšบ','๐Ÿšผ','๐Ÿšพ','๐Ÿšฐ','๐Ÿšฎ','๐Ÿ…ฟ','โ™ฟ','๐Ÿšญ','๐Ÿˆท','๐Ÿˆธ','๐Ÿˆ‚','โ“‚','๐Ÿ›‚','๐Ÿ›„','๐Ÿ›…','๐Ÿ›ƒ','๐Ÿ‰‘','ใŠ™','ใŠ—','๐Ÿ†‘','๐Ÿ†˜','๐Ÿ†”','๐Ÿšซ','๐Ÿ”ž','๐Ÿ“ต','๐Ÿšฏ','๐Ÿšฑ','๐Ÿšณ','๐Ÿšท','๐Ÿšธ','โ›”','โœณ','โ‡','โŽ','โœ…','โœด','๐Ÿ’Ÿ','๐Ÿ†š','๐Ÿ“ณ','๐Ÿ“ด','๐Ÿ…ฐ','๐Ÿ…ฑ','๐Ÿ†Ž','๐Ÿ…พ','๐Ÿ’ ','โžฟ','โ™ป','โ™ˆ','โ™‰','โ™Š','โ™‹','โ™Œ','โ™','โ™Ž','โ™','โ™','โ™‘','โ™’','โ™“','โ›Ž','๐Ÿ”ฏ','๐Ÿง','๐Ÿ’น','๐Ÿ’ฒ','๐Ÿ’ฑ','ยฉ','ยฎ','โ„ข','ใ€ฝ','ใ€ฐ','๐Ÿ”','๐Ÿ”š','๐Ÿ”™','๐Ÿ”›','๐Ÿ”œ','โŒ','โญ•','โ—','โ“','โ•','โ”','๐Ÿ”ƒ','๐Ÿ•›','๐Ÿ•ง','๐Ÿ•','๐Ÿ•œ','๐Ÿ•‘','๐Ÿ•','๐Ÿ•’','๐Ÿ•ž','๐Ÿ•“','๐Ÿ•Ÿ','๐Ÿ•”','๐Ÿ• ','๐Ÿ••','๐Ÿ•–','๐Ÿ•—','๐Ÿ•˜','๐Ÿ•™','๐Ÿ•š','๐Ÿ•ก','๐Ÿ•ข','๐Ÿ•ฃ','๐Ÿ•ค','๐Ÿ•ฅ','๐Ÿ•ฆ','โœ–','โž•','โž–','โž—','โ™ ','โ™ฅ','โ™ฃ','โ™ฆ','๐Ÿ’ฎ','๐Ÿ’ฏ','โœ”','โ˜‘','๐Ÿ”˜','๐Ÿ”—','โžฐ','๐Ÿ”ฑ','๐Ÿ”ฒ','๐Ÿ”ณ','โ—ผ','โ—ป','โ—พ','โ—ฝ','โ–ช','โ–ซ','๐Ÿ”บ','โฌœ','โฌ›','โšซ','โšช','๐Ÿ”ด','๐Ÿ”ต','๐Ÿ”ป','๐Ÿ”ถ','๐Ÿ”ท','๐Ÿ”ธ','๐Ÿ”น'];
28
- return emojiler[Math.floor(Math.random() * emojiler.length)];
29
- }
30
- function randomHex() {
31
- var letters = "0123456789ABCDEF";
32
- var color = "#";
33
- for (var i = 0; i < 6; i++) {
34
- color += letters[Math.floor(Math.random() * 16)];
35
- }
36
- return color;
37
- }
38
- var uuidRegex = {
39
-
40
- '3': /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
41
-
42
- '4': /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
43
-
44
- '5': /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
45
-
46
- all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
47
-
48
- }
49
- function uuid() {
50
- var uuid = "",
51
- i,
52
- random;
53
-
54
- for (i = 0; i < 32; i++) {
55
- random = (Math.random() * 16) | 0;
56
-
57
- if (i === 8 || i === 12 || i === 16 || i === 20) uuid += "-";
58
-
59
- uuid += (i === 12 ? 4 : i === 16 ? (random & 3) | 8 : random).toString(16);
60
- }
61
-
62
- return uuid;
63
- }
64
-
65
- function isUUID(str, version) {
66
- var pattern = uuidRegex[version || "all"];
67
-
68
- return (pattern && pattern.test(str)) || false;
69
- }
70
- function shuffleArray(array) {
71
- let currentIndex = array.length;
72
- while (currentIndex != 0) {
73
- let randomIndex = Math.floor(Math.random() * currentIndex);
74
- currentIndex--;
75
- [array[currentIndex], array[randomIndex]] = [
76
- array[randomIndex], array[currentIndex]];
77
- }
78
- return array;
79
- }
80
- function titleCase(sentence) {
81
- return sentence
82
- .toLowerCase()
83
- .split(" ")
84
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
85
- .join(" ");
86
- }
87
- module.exports = {
88
- makeUniqueId,
89
- randomArray,
90
- randomText,
91
- randomNumber,
92
- randomEmoji,
93
- randomHex,
94
- uid: {
95
- uuid,
96
- isUUID,
97
- },
98
- shuffleArray,
99
- titleCase
100
- };