@@ -106,6 +106,7 @@ if (removedInstanceFns.length) {
106
106
// constructor tests
107
107
const noArgument = bigInt ( ) ;
108
108
const numberArgument = bigInt ( 93 ) ;
109
+ const nativeBigintArgument = bigInt ( 93n ) ;
109
110
const stringArgument = bigInt ( "75643564363473453456342378564387956906736546456235345" ) ;
110
111
const baseArgumentInt = bigInt ( "101010" , 2 ) ;
111
112
const baseArgumentStr = bigInt ( "101010" , "2" ) ;
@@ -131,62 +132,73 @@ isBigInteger = bigInt[0];
131
132
isBigInteger = bigInt [ 999 ] ;
132
133
133
134
isBigInteger = bigInt . fromArray ( [ 1 , 2 , 3 ] ) ;
135
+ isBigInteger = bigInt . fromArray ( [ 1n , 2n , 3n ] ) ;
134
136
isBigInteger = bigInt . fromArray ( [ '1' , '2' , '3' ] ) ;
135
137
isBigInteger = bigInt . fromArray ( [ bigInt . one , bigInt . zero , bigInt ( 9 ) ] , 10 , true ) ;
136
138
137
139
isBigInteger = bigInt . gcd ( 0 , 1 ) ;
138
140
isBoolean = bigInt . isInstance ( x ) ;
139
141
isBigInteger = bigInt . lcm ( 0 , 1 ) ;
140
142
isBigInteger = bigInt . max ( 0 , 1 ) ;
141
- isBigInteger = bigInt . gcd ( 0 , 1 ) ;
143
+ isBigInteger = bigInt . min ( 0 , 1 ) ;
142
144
isBigInteger = bigInt . randBetween ( 0 , 1 ) ;
143
145
144
146
// Instance methods
145
147
isBigInteger = x . abs ( ) ;
146
- isBigInteger = x . add ( 0 ) . add ( x ) . add ( "100" ) ;
147
- isBigInteger = x . and ( 0 ) . and ( x ) . and ( "100" ) ;
148
+ isBigInteger = x . add ( 0 ) . add ( x ) . add ( "100" ) . add ( 100n ) ;
149
+ isBigInteger = x . and ( 0 ) . and ( x ) . and ( "100" ) . and ( 100n ) ;
148
150
149
151
isNumber = x . compare ( 0 ) ;
150
152
isNumber = x . compare ( x ) ;
151
153
isNumber = x . compare ( "100" ) ;
154
+ isNumber = x . compare ( 100n ) ;
152
155
153
156
isNumber = x . compareAbs ( 0 ) ;
154
157
isNumber = x . compareAbs ( x ) ;
155
158
isNumber = x . compareAbs ( "100" ) ;
159
+ isNumber = x . compareAbs ( 100n ) ;
156
160
157
161
isNumber = x . compareTo ( 0 ) ;
158
162
isNumber = x . compareTo ( x ) ;
159
163
isNumber = x . compareTo ( "100" ) ;
164
+ isNumber = x . compareTo ( 100n ) ;
160
165
161
- isBigInteger = x . divide ( 10 ) . divide ( x ) . divide ( '10' ) ;
166
+ isBigInteger = x . divide ( 10 ) . divide ( x ) . divide ( '10' ) . divide ( 10n ) ;
162
167
163
168
isDivmod = x . divmod ( 10 ) ;
164
169
isDivmod = x . divmod ( x ) ;
165
170
isDivmod = x . divmod ( "100" ) ;
171
+ isDivmod = x . divmod ( 100n ) ;
166
172
167
173
isBoolean = x . eq ( 0 ) ;
168
174
isBoolean = x . eq ( x ) ;
169
175
isBoolean = x . eq ( "100" ) ;
176
+ isBoolean = x . eq ( 100n ) ;
170
177
171
178
isBoolean = x . equals ( 0 ) ;
172
179
isBoolean = x . equals ( x ) ;
173
180
isBoolean = x . equals ( "100" ) ;
181
+ isBoolean = x . equals ( 100n ) ;
174
182
175
183
isBoolean = x . geq ( 0 ) ;
176
184
isBoolean = x . geq ( x ) ;
177
185
isBoolean = x . geq ( "100" ) ;
186
+ isBoolean = x . geq ( 100n ) ;
178
187
179
188
isBoolean = x . greater ( 0 ) ;
180
189
isBoolean = x . greater ( x ) ;
181
190
isBoolean = x . greater ( "100" ) ;
191
+ isBoolean = x . greater ( 100n ) ;
182
192
183
193
isBoolean = x . greaterOrEquals ( 0 ) ;
184
194
isBoolean = x . greaterOrEquals ( x ) ;
185
195
isBoolean = x . greaterOrEquals ( "100" ) ;
196
+ isBoolean = x . greaterOrEquals ( 100n ) ;
186
197
187
198
isBoolean = x . gt ( 0 ) ;
188
199
isBoolean = x . gt ( x ) ;
189
200
isBoolean = x . gt ( "100" ) ;
201
+ isBoolean = x . gt ( 100n ) ;
190
202
191
203
isBoolean = x . isDivisibleBy ( x ) ;
192
204
isBoolean = x . isEven ( ) ;
@@ -204,11 +216,11 @@ isBoolean = x.leq(x);
204
216
isBoolean = x . lesser ( 0 ) ;
205
217
isBoolean = x . lesserOrEquals ( 0 ) ;
206
218
isBoolean = x . lt ( 0 ) ;
207
- isBigInteger = x . minus ( 0 ) . minus ( x ) . minus ( '0' ) ;
208
- isBigInteger = x . mod ( 10 ) . mod ( x ) . mod ( '10' ) ;
209
- isBigInteger = bigInt ( 3 ) . modInv ( 11 ) ;
210
- isBigInteger = x . modPow ( 10 , 2 ) . modPow ( x , x ) . modPow ( '10' , '2' ) ;
211
- isBigInteger = x . multiply ( 0 ) . multiply ( x ) . multiply ( '0' ) ;
219
+ isBigInteger = x . minus ( 0 ) . minus ( x ) . minus ( '0' ) . minus ( 0n ) ;
220
+ isBigInteger = x . mod ( 10 ) . mod ( x ) . mod ( '10' ) . mod ( 10n ) ;
221
+ isBigInteger = bigInt ( 3 ) . modInv ( 11 ) . modInv ( 11n ) ;
222
+ isBigInteger = x . modPow ( 10 , 2 ) . modPow ( x , x ) . modPow ( '10' , '2' ) . modPow ( 10n , 2n ) ;
223
+ isBigInteger = x . multiply ( 0 ) . multiply ( x ) . multiply ( '0' ) . multiply ( 0n ) ;
212
224
isBigInteger = x . negate ( ) ;
213
225
isBoolean = x . neq ( x ) ;
214
226
isBigInteger = x . next ( ) ;
@@ -217,18 +229,19 @@ isBigInteger = x.not();
217
229
isBoolean = x . notEquals ( 0 ) ;
218
230
isBoolean = x . notEquals ( x ) ;
219
231
isBoolean = x . notEquals ( "100" ) ;
232
+ isBoolean = x . notEquals ( 100n ) ;
220
233
221
- isBigInteger = x . or ( 10 ) . or ( x ) . or ( '10' ) ;
222
- isBigInteger = x . over ( 10 ) . over ( x ) . over ( '10' ) ;
223
- isBigInteger = x . plus ( 0 ) . plus ( x ) . plus ( '0' ) ;
224
- isBigInteger = x . pow ( 0 ) . pow ( x ) . pow ( '0' ) ;
234
+ isBigInteger = x . or ( 10 ) . or ( x ) . or ( '10' ) . or ( 10n ) ;
235
+ isBigInteger = x . over ( 10 ) . over ( x ) . over ( '10' ) . over ( 10n ) ;
236
+ isBigInteger = x . plus ( 0 ) . plus ( x ) . plus ( '0' ) . plus ( 0n ) ;
237
+ isBigInteger = x . pow ( 0 ) . pow ( x ) . pow ( '0' ) . pow ( 0n ) ;
225
238
isBigInteger = x . prev ( ) ;
226
- isBigInteger = x . remainder ( 10 ) . remainder ( x ) . remainder ( '10' ) ;
227
- isBigInteger = x . shiftLeft ( 0 ) . shiftLeft ( '0' ) ;
228
- isBigInteger = x . shiftRight ( 0 ) . shiftRight ( '0' ) ;
239
+ isBigInteger = x . remainder ( 10 ) . remainder ( x ) . remainder ( '10' ) . remainder ( 10n ) ;
240
+ isBigInteger = x . shiftLeft ( 0 ) . shiftLeft ( '0' ) . shiftLeft ( 0n ) ;
241
+ isBigInteger = x . shiftRight ( 0 ) . shiftRight ( '0' ) . shiftRight ( 0n ) ;
229
242
isBigInteger = x . square ( ) ;
230
- isBigInteger = x . subtract ( 0 ) . subtract ( x ) . subtract ( '0' ) ;
231
- isBigInteger = x . times ( 0 ) . times ( x ) . times ( '0' ) ;
243
+ isBigInteger = x . subtract ( 0 ) . subtract ( x ) . subtract ( '0' ) . subtract ( 0n ) ;
244
+ isBigInteger = x . times ( 0 ) . times ( x ) . times ( '0' ) . times ( 0n ) ;
232
245
isNumber = x . toJSNumber ( ) ;
233
246
234
247
isBaseArray = x . toArray ( 10 ) ;
@@ -239,4 +252,4 @@ isString = x.toString(36);
239
252
isString = x . toJSON ( ) ;
240
253
241
254
isNumber = x . valueOf ( ) ;
242
- isBigInteger = x . xor ( 0 ) . xor ( x ) . xor ( '0' ) ;
255
+ isBigInteger = x . xor ( 0 ) . xor ( x ) . xor ( '0' ) . xor ( 0n ) ;
0 commit comments