@onflow/util-address
Advanced tools
Comparing version 1.0.3 to 1.1.0-alpha.0
# @onflow/util-address | ||
## 1.1.0-alpha.0 | ||
### Minor Changes | ||
- [#1494](https://github.com/onflow/fcl-js/pull/1494) [`5bec5576`](https://github.com/onflow/fcl-js/commit/5bec5576a79809d0684411736e3f4c02b8051c22) Thanks [@chasefleming](https://github.com/chasefleming)! - Add JSDoc to util-address package. | ||
## 1.0.3 | ||
@@ -4,0 +10,0 @@ |
@@ -5,2 +5,7 @@ 'use strict'; | ||
/** | ||
* Removes 0x from address if present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function sansPrefix(address) { | ||
@@ -10,2 +15,8 @@ if (address == null) return null; | ||
} | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function withPrefix(address) { | ||
@@ -15,2 +26,8 @@ if (address == null) return null; | ||
} | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function display(address) { | ||
@@ -17,0 +34,0 @@ return withPrefix(address); |
@@ -0,1 +1,6 @@ | ||
/** | ||
* Removes 0x from address if present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function sansPrefix(address) { | ||
@@ -5,2 +10,8 @@ if (address == null) return null; | ||
} | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function withPrefix(address) { | ||
@@ -10,2 +21,8 @@ if (address == null) return null; | ||
} | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function display(address) { | ||
@@ -12,0 +29,0 @@ return withPrefix(address); |
@@ -7,2 +7,7 @@ (function (global, factory) { | ||
/** | ||
* Removes 0x from address if present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function sansPrefix(address) { | ||
@@ -12,2 +17,8 @@ if (address == null) return null; | ||
} | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function withPrefix(address) { | ||
@@ -17,2 +28,8 @@ if (address == null) return null; | ||
} | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
function display(address) { | ||
@@ -19,0 +36,0 @@ return withPrefix(address); |
{ | ||
"name": "@onflow/util-address", | ||
"version": "1.0.3", | ||
"version": "1.1.0-alpha.0", | ||
"description": "Flow JS SDK Util -- Address", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -1,2 +0,7 @@ | ||
export function sansPrefix(address) { | ||
/** | ||
* Removes 0x from address if present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
export function sansPrefix(address) { | ||
if (address == null) return null | ||
@@ -6,2 +11,7 @@ return address.replace(/^0x/, "").replace(/^Fx/, "") | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
export function withPrefix(address) { | ||
@@ -12,4 +22,9 @@ if (address == null) return null | ||
/** | ||
* Adds 0x to address if not already present | ||
* @param {string} address | ||
* @returns {string} | ||
*/ | ||
export function display(address) { | ||
return withPrefix(address) | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
11594
126
1