@dioxide-js/misc
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.1.6](https://github.com/duiyuan/misc/compare/v0.1.5...v0.1.6) (2022-09-23) | ||
### Features | ||
* impl getTruelyAddress ([a386791](https://github.com/duiyuan/misc/commit/a3867918dc7c7138c91ddeb76ac2fcf04f52ddc2)) | ||
### [0.1.5](https://github.com/duiyuan/misc/compare/v0.1.4...v0.1.5) (2022-09-22) | ||
@@ -7,0 +14,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAddressType = exports.addressToShard = exports.isDioxideAddress = void 0; | ||
exports.getTruelyAddress = exports.getAddressType = exports.addressToShard = exports.isDioxideAddress = void 0; | ||
var crc32c_1 = __importDefault(require("crc-32/crc32c")); | ||
@@ -89,2 +89,8 @@ var base32_encode_1 = __importDefault(require("base32-encode")); | ||
exports.getAddressType = getAddressType; | ||
var getTruelyAddress = function (addr) { | ||
addr = addr.includes(':') ? addr.split(':')[0] : addr; | ||
var type = (0, exports.getAddressType)(addr); | ||
return !type ? addr : [addr, type].join(':'); | ||
}; | ||
exports.getTruelyAddress = getTruelyAddress; | ||
//# sourceMappingURL=address.js.map |
@@ -18,1 +18,2 @@ /** | ||
export declare const getAddressType: (addr: string, variant?: Variant) => DioxideAddrSignatur | null; | ||
export declare const getTruelyAddress: (addr: string) => string; |
{ | ||
"name": "@dioxide-js/misc", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Simple misc", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
633376
2488