@grain/stdlib 0.5.12 → 0.6.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/CHANGELOG.md +200 -0
- package/LICENSE +1 -1
- package/README.md +25 -2
- package/array.gr +1512 -199
- package/array.md +2032 -94
- package/bigint.gr +239 -140
- package/bigint.md +450 -106
- package/buffer.gr +595 -102
- package/buffer.md +903 -145
- package/bytes.gr +401 -110
- package/bytes.md +551 -63
- package/char.gr +228 -49
- package/char.md +373 -7
- package/exception.gr +26 -12
- package/exception.md +29 -5
- package/float32.gr +130 -109
- package/float32.md +185 -57
- package/float64.gr +112 -99
- package/float64.md +185 -57
- package/hash.gr +47 -37
- package/hash.md +21 -3
- package/int16.gr +430 -0
- package/int16.md +618 -0
- package/int32.gr +200 -269
- package/int32.md +254 -289
- package/int64.gr +142 -225
- package/int64.md +254 -289
- package/int8.gr +511 -0
- package/int8.md +786 -0
- package/json.gr +2084 -0
- package/json.md +608 -0
- package/list.gr +120 -68
- package/list.md +125 -80
- package/map.gr +560 -57
- package/map.md +672 -56
- package/marshal.gr +239 -227
- package/marshal.md +36 -4
- package/number.gr +626 -676
- package/number.md +738 -153
- package/option.gr +33 -35
- package/option.md +58 -42
- package/package.json +2 -2
- package/path.gr +148 -187
- package/path.md +47 -96
- package/pervasives.gr +75 -416
- package/pervasives.md +85 -180
- package/priorityqueue.gr +433 -74
- package/priorityqueue.md +422 -54
- package/queue.gr +362 -80
- package/queue.md +433 -38
- package/random.gr +67 -75
- package/random.md +68 -40
- package/range.gr +135 -63
- package/range.md +198 -43
- package/rational.gr +284 -0
- package/rational.md +545 -0
- package/regex.gr +933 -1066
- package/regex.md +59 -60
- package/result.gr +23 -25
- package/result.md +54 -39
- package/runtime/atof/common.gr +78 -82
- package/runtime/atof/common.md +22 -10
- package/runtime/atof/decimal.gr +102 -127
- package/runtime/atof/decimal.md +28 -7
- package/runtime/atof/lemire.gr +56 -71
- package/runtime/atof/lemire.md +9 -1
- package/runtime/atof/parse.gr +83 -110
- package/runtime/atof/parse.md +12 -2
- package/runtime/atof/slow.gr +28 -35
- package/runtime/atof/slow.md +9 -1
- package/runtime/atof/table.gr +19 -18
- package/runtime/atof/table.md +10 -2
- package/runtime/atoi/parse.gr +153 -136
- package/runtime/atoi/parse.md +50 -1
- package/runtime/bigint.gr +410 -517
- package/runtime/bigint.md +71 -57
- package/runtime/compare.gr +176 -85
- package/runtime/compare.md +31 -1
- package/runtime/dataStructures.gr +144 -32
- package/runtime/dataStructures.md +267 -31
- package/runtime/debugPrint.gr +34 -15
- package/runtime/debugPrint.md +37 -5
- package/runtime/equal.gr +53 -52
- package/runtime/equal.md +30 -1
- package/runtime/exception.gr +38 -47
- package/runtime/exception.md +10 -8
- package/runtime/gc.gr +23 -152
- package/runtime/gc.md +13 -17
- package/runtime/malloc.gr +31 -31
- package/runtime/malloc.md +11 -3
- package/runtime/numberUtils.gr +191 -172
- package/runtime/numberUtils.md +17 -9
- package/runtime/numbers.gr +1695 -1021
- package/runtime/numbers.md +1098 -134
- package/runtime/string.gr +540 -242
- package/runtime/string.md +76 -6
- package/runtime/unsafe/constants.gr +30 -13
- package/runtime/unsafe/constants.md +80 -0
- package/runtime/unsafe/conv.gr +55 -28
- package/runtime/unsafe/conv.md +41 -9
- package/runtime/unsafe/memory.gr +10 -30
- package/runtime/unsafe/memory.md +15 -19
- package/runtime/unsafe/tags.gr +37 -21
- package/runtime/unsafe/tags.md +88 -8
- package/runtime/unsafe/wasmf32.gr +30 -36
- package/runtime/unsafe/wasmf32.md +64 -56
- package/runtime/unsafe/wasmf64.gr +30 -36
- package/runtime/unsafe/wasmf64.md +64 -56
- package/runtime/unsafe/wasmi32.gr +49 -66
- package/runtime/unsafe/wasmi32.md +102 -94
- package/runtime/unsafe/wasmi64.gr +52 -79
- package/runtime/unsafe/wasmi64.md +108 -100
- package/runtime/utils/printing.gr +13 -15
- package/runtime/utils/printing.md +11 -3
- package/runtime/wasi.gr +294 -295
- package/runtime/wasi.md +62 -42
- package/set.gr +574 -64
- package/set.md +634 -54
- package/stack.gr +181 -64
- package/stack.md +271 -42
- package/string.gr +453 -533
- package/string.md +241 -151
- package/uint16.gr +369 -0
- package/uint16.md +585 -0
- package/uint32.gr +470 -0
- package/uint32.md +737 -0
- package/uint64.gr +471 -0
- package/uint64.md +737 -0
- package/uint8.gr +369 -0
- package/uint8.md +585 -0
- package/uri.gr +1093 -0
- package/uri.md +477 -0
- package/{sys → wasi}/file.gr +914 -500
- package/{sys → wasi}/file.md +454 -50
- package/wasi/process.gr +292 -0
- package/{sys → wasi}/process.md +164 -6
- package/wasi/random.gr +77 -0
- package/wasi/random.md +80 -0
- package/{sys → wasi}/time.gr +15 -22
- package/{sys → wasi}/time.md +5 -5
- package/immutablearray.gr +0 -929
- package/immutablearray.md +0 -1038
- package/immutablemap.gr +0 -493
- package/immutablemap.md +0 -479
- package/immutablepriorityqueue.gr +0 -360
- package/immutablepriorityqueue.md +0 -291
- package/immutableset.gr +0 -498
- package/immutableset.md +0 -449
- package/runtime/debug.gr +0 -2
- package/runtime/debug.md +0 -6
- package/runtime/unsafe/errors.gr +0 -36
- package/runtime/unsafe/errors.md +0 -204
- package/sys/process.gr +0 -254
- package/sys/random.gr +0 -79
- package/sys/random.md +0 -66
package/runtime/numberUtils.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NumberUtils
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Values
|
|
6
|
+
|
|
7
|
+
Functions and constants included in the NumberUtils module.
|
|
8
|
+
|
|
1
9
|
### NumberUtils.**_MAX_DOUBLE_LENGTH**
|
|
2
10
|
|
|
3
11
|
```grain
|
|
@@ -7,54 +15,54 @@ _MAX_DOUBLE_LENGTH : WasmI32
|
|
|
7
15
|
### NumberUtils.**get_POWERS10**
|
|
8
16
|
|
|
9
17
|
```grain
|
|
10
|
-
get_POWERS10 : ()
|
|
18
|
+
get_POWERS10 : () => WasmI32
|
|
11
19
|
```
|
|
12
20
|
|
|
13
21
|
### NumberUtils.**get_HEX_DIGITS**
|
|
14
22
|
|
|
15
23
|
```grain
|
|
16
|
-
get_HEX_DIGITS : ()
|
|
24
|
+
get_HEX_DIGITS : () => WasmI32
|
|
17
25
|
```
|
|
18
26
|
|
|
19
27
|
### NumberUtils.**decimalCount32**
|
|
20
28
|
|
|
21
29
|
```grain
|
|
22
|
-
decimalCount32 : WasmI32
|
|
30
|
+
decimalCount32 : (value: WasmI32) => WasmI32
|
|
23
31
|
```
|
|
24
32
|
|
|
25
33
|
### NumberUtils.**utoa32Buffered**
|
|
26
34
|
|
|
27
35
|
```grain
|
|
28
|
-
utoa32Buffered : (WasmI32, WasmI32, WasmI32)
|
|
36
|
+
utoa32Buffered : (buf: WasmI32, value: WasmI32, radix: WasmI32) => Void
|
|
29
37
|
```
|
|
30
38
|
|
|
31
39
|
### NumberUtils.**utoa32**
|
|
32
40
|
|
|
33
41
|
```grain
|
|
34
|
-
utoa32 : (WasmI32, WasmI32)
|
|
42
|
+
utoa32 : (value: WasmI32, radix: WasmI32) => String
|
|
35
43
|
```
|
|
36
44
|
|
|
37
45
|
### NumberUtils.**itoa32**
|
|
38
46
|
|
|
39
47
|
```grain
|
|
40
|
-
itoa32 : (WasmI32, WasmI32)
|
|
48
|
+
itoa32 : (value: WasmI32, radix: WasmI32) => String
|
|
41
49
|
```
|
|
42
50
|
|
|
43
51
|
### NumberUtils.**utoa64**
|
|
44
52
|
|
|
45
53
|
```grain
|
|
46
|
-
utoa64 : (WasmI64, WasmI32)
|
|
54
|
+
utoa64 : (value: WasmI64, radix: WasmI32) => String
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
### NumberUtils.**itoa64**
|
|
50
58
|
|
|
51
59
|
```grain
|
|
52
|
-
itoa64 : (WasmI64, WasmI32)
|
|
60
|
+
itoa64 : (value: WasmI64, radix: WasmI32) => String
|
|
53
61
|
```
|
|
54
62
|
|
|
55
63
|
### NumberUtils.**dtoa**
|
|
56
64
|
|
|
57
65
|
```grain
|
|
58
|
-
dtoa : WasmF64
|
|
66
|
+
dtoa : (value: WasmF64) => String
|
|
59
67
|
```
|
|
60
68
|
|