@naturalcycles/js-lib 15.80.0 → 15.81.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/dist/types.d.ts +1 -0
- package/package.json +3 -3
- package/src/object/deepEquals.ts +2 -2
- package/src/types.ts +2 -0
package/dist/types.d.ts
CHANGED
|
@@ -234,6 +234,7 @@ export type NumberOfMilliseconds = number;
|
|
|
234
234
|
* Integer between 0 and 100 (inclusive).
|
|
235
235
|
*/
|
|
236
236
|
export type NumberOfPercent = number;
|
|
237
|
+
export type NumberOfBytes = number;
|
|
237
238
|
/**
|
|
238
239
|
* Same as `number`, but with semantic meaning that it's an Integer.
|
|
239
240
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/js-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.81.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2"
|
|
7
7
|
},
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"@types/crypto-js": "^4",
|
|
18
18
|
"@types/node": "^26",
|
|
19
19
|
"@types/semver": "^7",
|
|
20
|
+
"typescript": "rc",
|
|
20
21
|
"crypto-js": "^4",
|
|
21
22
|
"dayjs": "^1",
|
|
22
|
-
"
|
|
23
|
-
"@naturalcycles/dev-lib": "18.4.2"
|
|
23
|
+
"@naturalcycles/dev-lib": "0.0.0"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": "./dist/index.js",
|
package/src/object/deepEquals.ts
CHANGED
|
@@ -53,7 +53,7 @@ export function _deepEquals<T>(a: T, b: T): boolean {
|
|
|
53
53
|
if (Array.isArray(a)) {
|
|
54
54
|
const length = a.length
|
|
55
55
|
if (!Array.isArray(b) || length !== b.length) return false
|
|
56
|
-
for (let i = length; i-- !== 0;
|
|
56
|
+
for (let i = length; i-- !== 0;) {
|
|
57
57
|
if (!_deepEquals(a[i], b[i])) return false
|
|
58
58
|
}
|
|
59
59
|
return true
|
|
@@ -134,7 +134,7 @@ export function _deepJsonEquals<T>(a: T, b: T): boolean {
|
|
|
134
134
|
if (Array.isArray(a)) {
|
|
135
135
|
const length = a.length
|
|
136
136
|
if (!Array.isArray(b) || length !== b.length) return false
|
|
137
|
-
for (let i = length; i-- !== 0;
|
|
137
|
+
for (let i = length; i-- !== 0;) {
|
|
138
138
|
if (!_deepJsonEquals(a[i], b[i])) return false
|
|
139
139
|
}
|
|
140
140
|
return true
|
package/src/types.ts
CHANGED