@hugoalh/adler32 0.6.1 → 0.6.2
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/README.md +6 -9
- package/mod.d.ts +7 -2
- package/mod.d.ts.map +1 -1
- package/mod.js +0 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,6 @@ This does not request any runtime permission.
|
|
|
40
40
|
|
|
41
41
|
- ```ts
|
|
42
42
|
class Adler32 {
|
|
43
|
-
constructor(data?: Adler32AcceptDataType);
|
|
44
43
|
get freezed(): boolean;
|
|
45
44
|
freeze(): this;
|
|
46
45
|
hash(): Uint8Array;
|
|
@@ -70,22 +69,20 @@ This does not request any runtime permission.
|
|
|
70
69
|
```
|
|
71
70
|
- ```powershell
|
|
72
71
|
adler32 --file $FilePath
|
|
73
|
-
<# 🔀 Unordered Positions: `--file`, `$FilePath` #>
|
|
74
72
|
```
|
|
75
|
-
| **Argument** | **Type** | **Description** |
|
|
76
|
-
|:--|:--|:--|
|
|
77
|
-
| `file` | `switch` | Whether the resource is from file. |
|
|
78
73
|
- ```powershell
|
|
79
74
|
adler32 --stdin
|
|
80
75
|
```
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
|
|
77
|
+
| **Argument** | **Type** | **Description** |
|
|
78
|
+
|:--|:--|:--|
|
|
79
|
+
| `file` | `switch` | Whether the resource is from file. |
|
|
80
|
+
| `stdin` | `switch` | Whether the resource is from standard stream input. |
|
|
84
81
|
|
|
85
82
|
## ✍️ Examples
|
|
86
83
|
|
|
87
84
|
- ```ts
|
|
88
|
-
new Adler32("Wikipedia").hashHex();
|
|
85
|
+
new Adler32().update("Wikipedia").hashHex();
|
|
89
86
|
//=> "11E60398"
|
|
90
87
|
```
|
|
91
88
|
- ```powershell
|
package/mod.d.ts
CHANGED
|
@@ -7,9 +7,14 @@ export declare class Adler32 {
|
|
|
7
7
|
get [Symbol.toStringTag](): string;
|
|
8
8
|
/**
|
|
9
9
|
* Initialize.
|
|
10
|
-
* @param {Adler32AcceptDataType} [data] Data. Can append later via the method {@linkcode Adler32.update} and {@linkcode Adler32.updateFromStream}.
|
|
11
10
|
*/
|
|
12
|
-
constructor(
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Initialize.
|
|
14
|
+
* @param {Adler32AcceptDataType} data Data.
|
|
15
|
+
* @deprecated Append data via the method {@linkcode Adler32.update} or {@linkcode Adler32.updateFromStream} instead.
|
|
16
|
+
*/
|
|
17
|
+
constructor(data: Adler32AcceptDataType);
|
|
13
18
|
/**
|
|
14
19
|
* Whether the instance is freezed.
|
|
15
20
|
* @returns {boolean}
|
package/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["src/mod.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAC9B,MAAM,GACN,cAAc,GACd,UAAU,GACV,WAAW,GACX,WAAW,CAAC;AACf;;GAEG;AACH,qBAAa,OAAO;;IACnB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAMD
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["src/mod.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAC9B,MAAM,GACN,cAAc,GACd,UAAU,GACV,WAAW,GACX,WAAW,CAAC;AACf;;GAEG;AACH,qBAAa,OAAO;;IACnB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAMD;;OAEG;;IAEH;;;;OAIG;gBACS,IAAI,EAAE,qBAAqB;IAMvC;;;OAGG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IACD;;;OAGG;IACH,MAAM,IAAI,IAAI;IAId;;;OAGG;IACH,IAAI,IAAI,UAAU;IAIlB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAUjB;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI;IAazC;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,cAAc,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAMpF;AACD,eAAe,OAAO,CAAC"}
|
package/mod.js
CHANGED
|
@@ -14,10 +14,6 @@ export class Adler32 {
|
|
|
14
14
|
#hashUint8Array = null;
|
|
15
15
|
#a = 1n;
|
|
16
16
|
#b = 0n;
|
|
17
|
-
/**
|
|
18
|
-
* Initialize.
|
|
19
|
-
* @param {Adler32AcceptDataType} [data] Data. Can append later via the method {@linkcode Adler32.update} and {@linkcode Adler32.updateFromStream}.
|
|
20
|
-
*/
|
|
21
17
|
constructor(data) {
|
|
22
18
|
if (typeof data !== "undefined") {
|
|
23
19
|
this.update(data);
|