New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/util-address

Package Overview
Dependencies
Maintainers
12
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/util-address - npm Package Compare versions

Comparing version 1.2.0-alpha.0 to 1.2.0-typescript.0

dist/index.d.ts

18

.eslintrc.json

@@ -9,7 +9,8 @@ {

"extends": [
"plugin:jsdoc/recommended"
"plugin:jsdoc/recommended-typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"jsdoc"
],
"plugins": ["jsdoc", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {

@@ -21,9 +22,4 @@ "ecmaVersion": "latest",

"rules": {
"jsdoc/require-jsdoc": [
"error",
{
"publicOnly": true
}
]
"@typescript-eslint/no-explicit-any": "off"
}
}
}
# @onflow/util-address
## 1.2.0-alpha.0
## 1.2.0-typescript.0
### Minor Changes
- TS build
- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`9fca84a3`](https://github.com/onflow/fcl-js/commit/9fca84a3151d7f6aeb33870a302e9793f024516b) Thanks [@nialexsan](https://github.com/nialexsan)! - Convert to Typescript
- [#1801](https://github.com/onflow/fcl-js/pull/1801) [`86ce9f75`](https://github.com/onflow/fcl-js/commit/86ce9f75b5542a6bce76012e36a7a3d4fb6867f2) Thanks [@nialexsan](https://github.com/nialexsan)! - TS build
## 1.1.0

@@ -10,0 +12,0 @@

@@ -7,27 +7,27 @@ 'use strict';

* @description Removes 0x from address if present
* @param {string} address - Flow address
* @returns {string} - Flow address without 0x prefix
* @param address - Flow address
* @returns Flow address without 0x prefix
*/
function sansPrefix(address) {
if (address == null)
return null;
return address.replace(/^0x/, "").replace(/^Fx/, "");
if (address == null) return null;
return address.replace(/^0x/, "").replace(/^Fx/, "");
}
/**
* @description Adds 0x to address if not already present
* @param {string} address - Flow address
* @returns {string} - Flow address with 0x prefix
* @param address - Flow address
* @returns Flow address with 0x prefix
*/
function withPrefix(address) {
if (address == null)
return null;
return "0x" + sansPrefix(address);
if (address == null) return null;
return "0x" + sansPrefix(address);
}
/**
* @description Adds 0x to address if not already present
* @param {string} address - Flow address
* @returns {string} - Flow address with 0x prefix
* @param address - Flow address
* @returns Flow address with 0x prefix
*/
function display(address) {
return withPrefix(address);
return withPrefix(address);
}

@@ -34,0 +34,0 @@

/**
* @description Removes 0x from address if present
* @param {string} address - Flow address
* @returns {string} - Flow address without 0x prefix
* @param address - Flow address
* @returns Flow address without 0x prefix
*/
function sansPrefix(address) {
if (address == null)
return null;
return address.replace(/^0x/, "").replace(/^Fx/, "");
if (address == null) return null;
return address.replace(/^0x/, "").replace(/^Fx/, "");
}
/**
* @description Adds 0x to address if not already present
* @param {string} address - Flow address
* @returns {string} - Flow address with 0x prefix
* @param address - Flow address
* @returns Flow address with 0x prefix
*/
function withPrefix(address) {
if (address == null)
return null;
return "0x" + sansPrefix(address);
if (address == null) return null;
return "0x" + sansPrefix(address);
}
/**
* @description Adds 0x to address if not already present
* @param {string} address - Flow address
* @returns {string} - Flow address with 0x prefix
* @param address - Flow address
* @returns Flow address with 0x prefix
*/
function display(address) {
return withPrefix(address);
return withPrefix(address);
}

@@ -29,0 +29,0 @@

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["onflowUtil-address"] = {}));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["onflowUtil-address"] = {}));
})(this, (function (exports) { 'use strict';
/**
* @description Removes 0x from address if present
* @param {string} address - Flow address
* @returns {string} - Flow address without 0x prefix
*/
function sansPrefix(address) {
if (address == null)
return null;
return address.replace(/^0x/, "").replace(/^Fx/, "");
}
/**
* @description Adds 0x to address if not already present
* @param {string} address - Flow address
* @returns {string} - Flow address with 0x prefix
*/
function withPrefix(address) {
if (address == null)
return null;
return "0x" + sansPrefix(address);
}
/**
* @description Adds 0x to address if not already present
* @param {string} address - Flow address
* @returns {string} - Flow address with 0x prefix
*/
function display(address) {
return withPrefix(address);
}
/**
* @description Removes 0x from address if present
* @param address - Flow address
* @returns Flow address without 0x prefix
*/
function sansPrefix(address) {
if (address == null) return null;
return address.replace(/^0x/, "").replace(/^Fx/, "");
}
exports.display = display;
exports.sansPrefix = sansPrefix;
exports.withPrefix = withPrefix;
/**
* @description Adds 0x to address if not already present
* @param address - Flow address
* @returns Flow address with 0x prefix
*/
function withPrefix(address) {
if (address == null) return null;
return "0x" + sansPrefix(address);
}
Object.defineProperty(exports, '__esModule', { value: true });
/**
* @description Adds 0x to address if not already present
* @param address - Flow address
* @returns Flow address with 0x prefix
*/
function display(address) {
return withPrefix(address);
}
exports.display = display;
exports.sansPrefix = sansPrefix;
exports.withPrefix = withPrefix;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=util-address.umd.js.map
{
"name": "@onflow/util-address",
"version": "1.2.0-alpha.0",
"version": "1.2.0-typescript.0",
"description": "Flow JS SDK Util -- Address",

@@ -16,7 +16,11 @@ "license": "Apache-2.0",

"devDependencies": {
"@onflow/fcl-bundle": "^1.4.0-alpha.0",
"@onflow/types": "^1.2.0-alpha.0",
"@babel/preset-typescript": "^7.22.5",
"@onflow/fcl-bundle": "^1.4.0-typescript.0",
"@onflow/types": "^1.2.0-typescript.0",
"@types/jest": "^29.5.3",
"@types/node": "^18.13.0",
"eslint": "^8.33.0",
"eslint-plugin-jsdoc": "^39.7.5",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"eslint": "^8.47.0",
"eslint-plugin-jsdoc": "^46.4.6",
"jest": "^29.5.0",

@@ -29,3 +33,3 @@ "typescript": "^4.9.5"

"unpkg": "dist/util-address.umd.js",
"types": "dist/types/index.d.ts",
"types": "dist/index.d.ts",
"scripts": {

@@ -32,0 +36,0 @@ "prepublishOnly": "npm test && npm run build",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc