mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-06-21 01:41:03 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { createCmp } from '../bi/helpers.js';
|
||||
/**
|
||||
* @name bnMax
|
||||
* @summary Finds and returns the highest value in an array of BNs.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import BN from 'bn.js';
|
||||
* import { bnMax } from '@pezkuwi/util';
|
||||
*
|
||||
* bnMax([new BN(1), new BN(3), new BN(2)]).toString(); // => '3'
|
||||
* ```
|
||||
*/
|
||||
export const bnMax = /*#__PURE__*/ createCmp((a, b) => a.gt(b));
|
||||
/**
|
||||
* @name bnMin
|
||||
* @summary Finds and returns the smallest value in an array of BNs.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import BN from 'bn.js';
|
||||
* import { bnMin } from '@pezkuwi/util';
|
||||
*
|
||||
* bnMin([new BN(1), new BN(3), new BN(2)]).toString(); // => '1'
|
||||
* ```
|
||||
*/
|
||||
export const bnMin = /*#__PURE__*/ createCmp((a, b) => a.lt(b));
|
||||
Reference in New Issue
Block a user