@exodus/bigint 1.0.1-rc.1 → 1.1.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/package.json +3 -2
- package/src/native-bigint.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bigint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "bigint wrappers for native BigUnt, bn.js and others",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/ExodusMovement/exodus-core/issues?q=is%3Aissue+is%3Aopen+label%3Abigint"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"gitHead": "e5bfe616c692bc9f8f28af812777646895306a76"
|
|
35
36
|
}
|
package/src/native-bigint.js
CHANGED
|
@@ -11,6 +11,7 @@ const unwrap = (value) => (value instanceof Wrapper ? value.unwrap() : value)
|
|
|
11
11
|
const memoizedWrap = memoize((value) => Wrapper.wrap(value))
|
|
12
12
|
|
|
13
13
|
const BI_ZERO = BigInt(0)
|
|
14
|
+
const BI_TEN = BigInt(10)
|
|
14
15
|
|
|
15
16
|
export default class Wrapper {
|
|
16
17
|
static name = 'native-bigint'
|
|
@@ -39,7 +40,7 @@ export default class Wrapper {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
static get TEN() {
|
|
42
|
-
return memoizedWrap(
|
|
43
|
+
return memoizedWrap(BI_TEN)
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
__value__
|