uglify-js-minify-css-allfiles 2.0.4 → 2.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/test/test.js CHANGED
@@ -1,89 +1,89 @@
1
1
  class ModernBank {
2
- // Private fields
3
- #balance = 0;
4
- #transactionHistory = [];
5
-
6
- // Public field
7
- accountType = 'Checking';
8
-
9
- // Static private field
10
- static #bankName = 'Modern JS Bank';
11
-
12
- // Static public field
13
- static exchangeRate = 1.2;
14
-
15
- // Static initialization block
16
- static {
17
- console.log(`${this.#bankName} is initializing...`);
18
- }
19
-
20
- constructor(initialBalance) {
21
- this.#balance = initialBalance;
22
- this.#addTransaction('Initial deposit', initialBalance);
23
- }
24
-
25
- // Private method
26
- #addTransaction(description, amount) {
27
- this.#transactionHistory.push({ description, amount, date: new Date() });
28
- }
29
-
30
- // Public method
31
- deposit(amount) {
32
- this.#balance += amount;
33
- this.#addTransaction('Deposit', amount);
34
- }
35
-
36
- // Public method with optional chaining and nullish coalescing
37
- withdraw(amount, { fee, description } = {}) {
38
- const totalAmount = amount + (fee ?? 0);
39
- if (this.#balance >= totalAmount) {
40
- this.#balance -= totalAmount;
41
- this.#addTransaction(description?.trim() || 'Withdrawal', -amount);
42
- if (fee) this.#addTransaction('Withdrawal fee', -fee);
43
- return true;
44
- }
45
- return false;
46
- }
47
-
48
- // Getter
49
- get balance() {
50
- return this.#balance;
51
- }
52
-
53
- // Static method
54
- static convertCurrency(amount) {
55
- return amount * this.exchangeRate;
56
- }
57
-
58
- // Async method
59
- async getTransactionHistory() {
60
- // Simulating an async operation
61
- await new Promise((resolve) => setTimeout(resolve, 1000));
62
- return this.#transactionHistory;
63
- }
64
-
65
- // Method using the logical assignment operator
66
- updateAccountType(newType) {
67
- this.accountType ||= newType;
68
- }
69
-
70
- // toString method using template literals
71
- toString() {
72
- return `ModernBank account (${this.accountType}) - Balance: $${this.#balance}`;
2
+ // Private fields
3
+ #balance = 0;
4
+ #transactionHistory = [];
5
+
6
+ // Public field
7
+ accountType = 'Checking';
8
+
9
+ // Static private field
10
+ static #bankName = 'Modern JS Bank';
11
+
12
+ // Static public field
13
+ static exchangeRate = 1.2;
14
+
15
+ // Static initialization block
16
+ static {
17
+ console.log(`${this.#bankName} is initializing...`);
18
+ }
19
+
20
+ constructor(initialBalance) {
21
+ this.#balance = initialBalance;
22
+ this.#addTransaction('Initial deposit', initialBalance);
23
+ }
24
+
25
+ // Private method
26
+ #addTransaction(description, amount) {
27
+ this.#transactionHistory.push({ description, amount, date: new Date() });
28
+ }
29
+
30
+ // Public method
31
+ deposit(amount) {
32
+ this.#balance += amount;
33
+ this.#addTransaction('Deposit', amount);
34
+ }
35
+
36
+ // Public method with optional chaining and nullish coalescing
37
+ withdraw(amount, { fee, description } = {}) {
38
+ const totalAmount = amount + (fee ?? 0);
39
+ if (this.#balance >= totalAmount) {
40
+ this.#balance -= totalAmount;
41
+ this.#addTransaction(description?.trim() || 'Withdrawal', -amount);
42
+ if (fee) this.#addTransaction('Withdrawal fee', -fee);
43
+ return true;
73
44
  }
45
+ return false;
46
+ }
47
+
48
+ // Getter
49
+ get balance() {
50
+ return this.#balance;
51
+ }
52
+
53
+ // Static method
54
+ static convertCurrency(amount) {
55
+ return amount * this.exchangeRate;
56
+ }
57
+
58
+ // Async method
59
+ async getTransactionHistory() {
60
+ // Simulating an async operation
61
+ await new Promise((resolve) => setTimeout(resolve, 1000));
62
+ return this.#transactionHistory;
63
+ }
64
+
65
+ // Method using the logical assignment operator
66
+ updateAccountType(newType) {
67
+ this.accountType ||= newType;
68
+ }
69
+
70
+ // toString method using template literals
71
+ toString() {
72
+ return `ModernBank account (${this.accountType}) - Balance: $${this.#balance}`;
73
+ }
74
74
  }
75
75
 
76
76
  // Usage example
77
77
  (async () => {
78
- const account = new ModernBank(1000);
79
- account.deposit(500);
80
- account.withdraw(200, { fee: 5, description: 'ATM withdrawal ' });
81
- account.updateAccountType('Savings');
78
+ const account = new ModernBank(1000);
79
+ account.deposit(500);
80
+ account.withdraw(200, { fee: 5, description: 'ATM withdrawal ' });
81
+ account.updateAccountType('Savings');
82
82
 
83
- console.log(account.toString());
84
- console.log(`Balance: $${account.balance}`);
85
- console.log(`$100 in foreign currency: $${ModernBank.convertCurrency(100)}`);
83
+ console.log(account.toString());
84
+ console.log(`Balance: $${account.balance}`);
85
+ console.log(`$100 in foreign currency: $${ModernBank.convertCurrency(100)}`);
86
86
 
87
- const history = await account.getTransactionHistory();
88
- console.log('Transaction History:', history);
87
+ const history = await account.getTransactionHistory();
88
+ console.log('Transaction History:', history);
89
89
  })();
package/logs/error.log DELETED
@@ -1,6 +0,0 @@
1
-
2
- =============== File Error ===============
3
- Time: 08/19/2024, 21:39:36
4
- File: test\test.js
5
- Reason: Invalid or empty content
6
- ==========================================
package/logs/summary.log DELETED
@@ -1,112 +0,0 @@
1
-
2
- =============== Processing Summary ===============
3
- Time: 08/19/2024, 21:39:36
4
- Total files processed: 2
5
- Files with errors: 1
6
- Error files:
7
- 1. test\test.js
8
- ==================================================
9
-
10
- =============== Processing Summary ===============
11
- Time: 08/19/2024, 21:40:08
12
- Total files processed: 0
13
- Files with errors: 0
14
- Error files:
15
-
16
- ==================================================
17
-
18
- =============== Processing Summary ===============
19
- Time: 08/19/2024, 21:57:46
20
- Total files processed: 0
21
- Files with errors: 0
22
- Error files:
23
-
24
- ==================================================
25
-
26
- =============== Processing Summary ===============
27
- Time: 08/19/2024, 22:14:47
28
- Total files processed: 0
29
- Files with errors: 0
30
- Error files:
31
-
32
- ==================================================
33
-
34
- =============== Processing Summary ===============
35
- Time: 08/19/2024, 22:20:22
36
- Total files processed: 0
37
- Files with errors: 0
38
- Error files:
39
-
40
- ==================================================
41
-
42
- =============== Processing Summary ===============
43
- Time: 08/19/2024, 22:24:04
44
- Total files processed: 0
45
- Files with errors: 0
46
- Error files:
47
-
48
- ==================================================
49
-
50
- =============== Processing Summary ===============
51
- Time: 08/19/2024, 22:25:15
52
- Total files processed: 0
53
- Files with errors: 0
54
- Error files:
55
-
56
- ==================================================
57
-
58
- =============== Processing Summary ===============
59
- Time: 08/19/2024, 22:32:13
60
- Total files processed: 0
61
- Files with errors: 0
62
- Error files:
63
-
64
- ==================================================
65
-
66
- =============== Processing Summary ===============
67
- Time: 08/19/2024, 22:32:49
68
- Total files processed: 0
69
- Files with errors: 0
70
- Error files:
71
-
72
- ==================================================
73
-
74
- =============== Processing Summary ===============
75
- Time: 08/19/2024, 22:33:35
76
- Total files processed: 0
77
- Files with errors: 0
78
- Error files:
79
-
80
- ==================================================
81
-
82
- =============== Processing Summary ===============
83
- Time: 08/19/2024, 22:42:58
84
- Total files processed: 0
85
- Files with errors: 0
86
- Error files:
87
-
88
- ==================================================
89
-
90
- =============== Processing Summary ===============
91
- Time: 08/19/2024, 22:43:10
92
- Total files processed: 0
93
- Files with errors: 0
94
- Error files:
95
-
96
- ==================================================
97
-
98
- =============== Processing Summary ===============
99
- Time: 08/20/2024, 10:34:11
100
- Total files processed: 0
101
- Files with errors: 0
102
- Error files:
103
-
104
- ==================================================
105
-
106
- =============== Processing Summary ===============
107
- Time: 08/20/2024, 10:38:29
108
- Total files processed: 0
109
- Files with errors: 0
110
- Error files:
111
-
112
- ==================================================