@hazae41/stdbob 0.0.10 → 0.0.12
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
package/src/mods/bigints/mod.ts
CHANGED
|
@@ -5,14 +5,6 @@ export type bigintref = externref
|
|
|
5
5
|
|
|
6
6
|
export namespace bigints {
|
|
7
7
|
|
|
8
|
-
// @ts-ignore: decorator
|
|
9
|
-
@external("bigints", "identity")
|
|
10
|
-
export declare function from(bigint: i64): bigintref
|
|
11
|
-
|
|
12
|
-
// @ts-ignore: decorator
|
|
13
|
-
@external("bigints", "identity")
|
|
14
|
-
export declare function into(bigint: bigintref): i64
|
|
15
|
-
|
|
16
8
|
// @ts-ignore: decorator
|
|
17
9
|
@external("bigints", "zero")
|
|
18
10
|
export declare function zero(): bigintref
|
|
@@ -100,6 +92,7 @@ export namespace bigints {
|
|
|
100
92
|
// @ts-ignore: decorator
|
|
101
93
|
@external("bigints", "to_base16")
|
|
102
94
|
export declare function toBase16(bigint: bigintref): textref
|
|
95
|
+
|
|
103
96
|
// @ts-ignore: decorator
|
|
104
97
|
@external("bigints", "from_base10")
|
|
105
98
|
export declare function fromBase10(text: textref): bigintref
|
|
@@ -108,4 +101,12 @@ export namespace bigints {
|
|
|
108
101
|
@external("bigints", "to_base10")
|
|
109
102
|
export declare function toBase10(bigint: bigintref): textref
|
|
110
103
|
|
|
104
|
+
// @ts-ignore: decorator
|
|
105
|
+
@external("bigints", "identity")
|
|
106
|
+
export declare function fromInt64(bigint: i64): bigintref
|
|
107
|
+
|
|
108
|
+
// @ts-ignore: decorator
|
|
109
|
+
@external("bigints", "identity")
|
|
110
|
+
export declare function toInt64(bigint: bigintref): i64
|
|
111
|
+
|
|
111
112
|
}
|
package/src/mods/blobs/mod.ts
CHANGED
package/src/mods/texts/mod.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type textref = externref
|
|
|
4
4
|
|
|
5
5
|
export namespace texts {
|
|
6
6
|
|
|
7
|
-
export function
|
|
7
|
+
export function fromString(string: string): textref {
|
|
8
8
|
const utf8 = String.UTF8.encode(string)
|
|
9
9
|
|
|
10
10
|
const blob = blobs.save(utf8)
|
|
@@ -13,7 +13,7 @@ export namespace texts {
|
|
|
13
13
|
return text
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export function
|
|
16
|
+
export function toString(text: textref): string {
|
|
17
17
|
const blob = toUtf8(text)
|
|
18
18
|
const utf8 = blobs.load(blob)
|
|
19
19
|
|