@xylabs/eth-address
Advanced tools
Comparing version 2.11.24 to 2.12.0
@@ -1,2 +0,1 @@ | ||
import { BigNumber } from '@xylabs/bignumber'; | ||
export declare const isEthAddress: (obj: { | ||
@@ -3,0 +2,0 @@ type: string; |
@@ -1,26 +0,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/ellipsize.ts | ||
var ellipsize_exports = {}; | ||
__export(ellipsize_exports, { | ||
ellipsize: () => ellipsize | ||
}); | ||
module.exports = __toCommonJS(ellipsize_exports); | ||
var ellipsize = (value, length = 2) => { | ||
@@ -31,6 +7,5 @@ const part1 = value.slice(0, length); | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
ellipsize | ||
}); | ||
}; | ||
//# sourceMappingURL=ellipsize.js.map |
@@ -1,2 +0,1 @@ | ||
import { BigNumber } from '@xylabs/bignumber'; | ||
export declare const isEthAddress: (obj: { | ||
@@ -3,0 +2,0 @@ type: string; |
@@ -1,29 +0,4 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/EthAddress.ts | ||
var EthAddress_exports = {}; | ||
__export(EthAddress_exports, { | ||
EthAddress: () => EthAddress, | ||
isEthAddress: () => isEthAddress | ||
}); | ||
module.exports = __toCommonJS(EthAddress_exports); | ||
var import_assert = require("@xylabs/assert"); | ||
var import_bignumber = require("@xylabs/bignumber"); | ||
import { assertEx } from "@xylabs/assert"; | ||
import { BigNumber } from "@xylabs/bignumber"; | ||
@@ -62,3 +37,3 @@ // src/ellipsize.ts | ||
if (value) { | ||
const bn = new import_bignumber.BigNumber(value.startsWith("0x") ? value.substring(2) : value, base); | ||
const bn = new BigNumber(value.startsWith("0x") ? value.substring(2) : value, base); | ||
return new _EthAddress(bn); | ||
@@ -76,3 +51,3 @@ } | ||
if (typeof address === "string") { | ||
inAddress = (0, import_assert.assertEx)(_EthAddress.fromString(address), "Bad Address"); | ||
inAddress = assertEx(_EthAddress.fromString(address), "Bad Address"); | ||
} else { | ||
@@ -104,7 +79,6 @@ inAddress = address; | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
EthAddress, | ||
isEthAddress | ||
}); | ||
}; | ||
//# sourceMappingURL=EthAddress.js.map |
@@ -1,30 +0,1 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
EthAddress: () => EthAddress, | ||
ellipsize: () => ellipsize, | ||
isEthAddress: () => isEthAddress, | ||
padHex: () => padHex | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
// src/ellipsize.ts | ||
@@ -38,4 +9,4 @@ var ellipsize = (value, length = 2) => { | ||
// src/EthAddress.ts | ||
var import_assert = require("@xylabs/assert"); | ||
var import_bignumber = require("@xylabs/bignumber"); | ||
import { assertEx } from "@xylabs/assert"; | ||
import { BigNumber } from "@xylabs/bignumber"; | ||
@@ -67,3 +38,3 @@ // src/padHex.ts | ||
if (value) { | ||
const bn = new import_bignumber.BigNumber(value.startsWith("0x") ? value.substring(2) : value, base); | ||
const bn = new BigNumber(value.startsWith("0x") ? value.substring(2) : value, base); | ||
return new _EthAddress(bn); | ||
@@ -81,3 +52,3 @@ } | ||
if (typeof address === "string") { | ||
inAddress = (0, import_assert.assertEx)(_EthAddress.fromString(address), "Bad Address"); | ||
inAddress = assertEx(_EthAddress.fromString(address), "Bad Address"); | ||
} else { | ||
@@ -109,4 +80,3 @@ inAddress = address; | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
EthAddress, | ||
@@ -116,3 +86,3 @@ ellipsize, | ||
padHex | ||
}); | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,26 +0,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/padHex.ts | ||
var padHex_exports = {}; | ||
__export(padHex_exports, { | ||
padHex: () => padHex | ||
}); | ||
module.exports = __toCommonJS(padHex_exports); | ||
var padHex = (hex, byteCount) => { | ||
@@ -38,6 +14,5 @@ let result = hex; | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
padHex | ||
}); | ||
}; | ||
//# sourceMappingURL=padHex.js.map |
@@ -18,3 +18,2 @@ { | ||
"docs": "dist/docs.json", | ||
"types": "dist/node/index.d.ts", | ||
"exports": { | ||
@@ -24,7 +23,7 @@ ".": { | ||
"types": "./dist/node/index.d.ts", | ||
"default": "./dist/node/index.js" | ||
"default": "./dist/node/index.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/node/index.d.mts", | ||
"default": "./dist/node/index.mjs" | ||
"default": "./dist/node/index.js" | ||
} | ||
@@ -37,4 +36,2 @@ }, | ||
}, | ||
"main": "dist/node/index.js", | ||
"module": "dist/node/index.mjs", | ||
"homepage": "https://xylabs.com", | ||
@@ -48,4 +45,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@xylabs/assert": "~2.11.24", | ||
"@xylabs/bignumber": "~2.11.24" | ||
"@xylabs/assert": "~2.12.0", | ||
"@xylabs/bignumber": "~2.12.0" | ||
}, | ||
@@ -66,4 +63,5 @@ "devDependencies": { | ||
"sideEffects": false, | ||
"version": "2.11.24", | ||
"packageManager": "yarn@3.3.1" | ||
"version": "2.12.0", | ||
"packageManager": "yarn@3.3.1", | ||
"type": "module" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
68029
831
+ Added@xylabs/assert@2.12.31(transitive)
+ Added@xylabs/bignumber@2.12.31(transitive)
- Removed@xylabs/assert@2.11.24(transitive)
- Removed@xylabs/bignumber@2.11.24(transitive)
Updated@xylabs/assert@~2.12.0
Updated@xylabs/bignumber@~2.12.0