@@ -11,8 +11,8 @@ static BigInt New(Napi::Env env, int64_t value);
11
11
static BigInt New(Napi::Env env, uint64_t value);
12
12
```
13
13
14
- - `[in] env`: The `napi_env` Environment
15
- - `[in] value`: The value the JavaScript BigInt will contain
14
+ - `[in] env`: The environment in which to construct the `BigInt` object.
15
+ - `[in] value`: The value the JavaScript ` BigInt` will contain
16
16
17
17
These APIs convert the C `int64_t` and `uint64_t` types to the JavaScript
18
18
`BigInt` type.
@@ -24,8 +24,8 @@ static BigInt New(Napi::Env env,
24
24
const uint64_t* words);
25
25
```
26
26
27
- - ` [in] env ` : The ` napi_env ` Environment
28
- - ` [in] sign_bit ` : Determines if the resulting BigInt will be positive or negative.
27
+ - ` [in] env ` : The environment in which to construct the ` BigInt ` object.
28
+ - ` [in] sign_bit ` : Determines if the resulting ` BigInt ` will be positive or negative.
29
29
- ` [in] word_count ` : The length of the words array.
30
30
- ` [in] words ` : An array of ` uint64_t ` little-endian 64-bit words.
31
31
@@ -41,7 +41,7 @@ The resulting `BigInt` is calculated as: (–1)<sup>`sign_bit`</sup> (`words[0]`
41
41
Napi::BigInt ();
42
42
```
43
43
44
- Returns a new empty JavaScript BigInt.
44
+ Returns a new empty JavaScript ` BigInt ` .
45
45
46
46
47
47
### Int64Value
@@ -50,44 +50,44 @@ Returns a new empty JavaScript BigInt.
50
50
int64_t Int64Value (bool* lossless) const;
51
51
```
52
52
53
- - `[out] lossless`: Indicates whether the BigInt value was converted
53
+ - `[out] lossless`: Indicates whether the ` BigInt` value was converted
54
54
losslessly.
55
55
56
56
This API returns the C `int64_t` primitive equivalent of the given JavaScript
57
- BigInt. If needed it will truncate the value, setting lossless to false.
57
+ ` BigInt` . If needed it will truncate the value, setting lossless to false.
58
58
59
59
### Uint64Value
60
60
61
61
```cpp
62
62
uint64_t Uint64Value(bool* lossless) const;
63
63
```
64
64
65
- - ` [out] lossless ` : Indicates whether the BigInt value was converted
65
+ - ` [out] lossless ` : Indicates whether the ` BigInt ` value was converted
66
66
losslessly.
67
67
68
68
This API returns the C ` uint64_t ` primitive equivalent of the given JavaScript
69
- BigInt. If needed it will truncate the value, setting lossless to false.
69
+ ` BigInt ` . If needed it will truncate the value, setting lossless to false.
70
70
71
71
### WordCount
72
72
73
73
``` cpp
74
74
size_t WordCount () const ;
75
75
```
76
76
77
- Returns the number of words needed to store this BigInt value.
77
+ Returns the number of words needed to store this ` BigInt ` value.
78
78
79
79
### ToWords
80
80
81
81
``` cpp
82
82
void ToWords (size_t* word_count, int* sign_bit, uint64_t* words);
83
83
```
84
84
85
- - `[out] sign_bit`: Integer representing if the JavaScript BigInt is positive
85
+ - `[out] sign_bit`: Integer representing if the JavaScript ` BigInt` is positive
86
86
or negative.
87
87
- `[in/out] word_count`: Must be initialized to the length of the words array.
88
88
Upon return, it will be set to the actual number of words that would be
89
- needed to store this BigInt.
89
+ needed to store this ` BigInt` .
90
90
- `[out] words`: Pointer to a pre-allocated 64-bit word array.
91
91
92
- This API converts a single BigInt value into a sign bit, 64-bit little-endian
92
+ This API converts a single ` BigInt` value into a sign bit, 64-bit little-endian
93
93
array, and the number of elements in the array.
0 commit comments