Skip to content

Commit a25e627

Browse files
committed
add isZero getter to BN & release 0.1.2
1 parent 5391bea commit a25e627

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.1.2] - 2023-03-07
10+
### Added
11+
- `@distributedlab/tools`: `isZero` getter to `BN` class
12+
913
## [0.1.1] - 2023-03-07
1014
### Fixed
1115
- `root`: Links to the packages in the `README.md` file
@@ -36,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3640

3741
[old repo]: https://github.com/distributed-lab/web-kit-old
3842

39-
[Unreleased]: https://github.com/distributed-lab/web-kit/compare/0.1.1...HEAD
43+
[Unreleased]: https://github.com/distributed-lab/web-kit/compare/0.1.2...HEAD
44+
[0.1.2]: https://github.com/distributed-lab/web-kit/compare/0.1.1...0.1.2
4045
[0.1.1]: https://github.com/distributed-lab/web-kit/compare/0.1.0...0.1.1
4146
[0.1.0]: https://github.com/distributed-lab/web-kit/releases/tag/0.1.0

packages/jac/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@distributedlab/jac",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "A library for constructing JSON-API compliant requests and responses",
55
"repository": {
66
"type": "git",

packages/tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@distributedlab/tools",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Collection of common utility functions and classes",
55
"repository": {
66
"type": "git",

packages/tools/src/bn.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ export class BN {
177177
return this.#bn
178178
}
179179

180+
public get isZero(): boolean {
181+
return this.#bn.isZero()
182+
}
183+
180184
public mul(other: BN): BN {
181185
const numWithGreatestDecimals = BN.#getGreatestDecimal(this, other)
182186
const [numA, numB] = BN.#toGreatestDecimals(this, other)

0 commit comments

Comments
 (0)