I am developing for my dApp projects' needs simple library functions. Always will be continue developing in this repository for our needs.
This is both library and test for copy all to remix.ide, and run it.
This is only library.
This is only Solidity tests.
If you want help this repository, please don't worry you can create any issue or pull requesting.
Simple array sorting descending and ascending. Example using;
contract C {
using SortingArray for uint256[];
uint256[] arr;
function asc() public view returns(uint256[] memory) {
return arr.sorting(SortingArray.DIRECTION.ASC);
}
function desc() public view returns(uint256[] memory) {
return arr.sorting(SortingArray.DIRECTION.DESC);
}
}
- Pulish on to the NPM.
- Write Waffle/Chai tests.