@talismn/util 0.0.0-pr790-20230522041511 → 0.0.0-pr866-20230622032449

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # @talismn/util
2
2
 
3
- ## 0.0.0-pr790-20230522041511
3
+ ## 0.0.0-pr866-20230622032449
4
+
5
+ ### Minor Changes
6
+
7
+ - 7573864f: chore: remove dead code
8
+
9
+ ## 0.1.9
4
10
 
5
11
  ### Patch Changes
6
12
 
@@ -6,7 +6,6 @@ export * from "./decodeAnyAddress";
6
6
  export * from "./deferred";
7
7
  export * from "./encodeAnyAddress";
8
8
  export * from "./formatDecimals";
9
- export * from "./getBase64ImageUrl";
10
9
  export * from "./hasOwnProperty";
11
10
  export * from "./isArrayOf";
12
11
  export * from "./isEthereumAddress";
@@ -148,16 +148,6 @@ const formatDecimals = (num, digits = MIN_DIGITS, options = {}, locale = "en-US"
148
148
  }).format(truncatedValue.toNumber());
149
149
  };
150
150
 
151
- const getBase64ImageUrl = base64 => {
152
- const match = /^data:([^;]*?);base64,(.*?)$/.exec(base64);
153
- if (!match) return null;
154
- const buffer = Buffer.from(match[2], "base64");
155
- const blob = new Blob([new Uint8Array(buffer, 0, buffer.length)], {
156
- type: match[1]
157
- });
158
- return URL.createObjectURL(blob);
159
- };
160
-
161
151
  function hasOwnProperty(obj, prop) {
162
152
  if (typeof obj !== "object") return false;
163
153
  if (obj === null) return false;
@@ -204,7 +194,6 @@ exports.classNames = classNames;
204
194
  exports.decodeAnyAddress = decodeAnyAddress;
205
195
  exports.encodeAnyAddress = encodeAnyAddress;
206
196
  exports.formatDecimals = formatDecimals;
207
- exports.getBase64ImageUrl = getBase64ImageUrl;
208
197
  exports.hasOwnProperty = hasOwnProperty;
209
198
  exports.isArrayOf = isArrayOf;
210
199
  exports.isEthereumAddress = isEthereumAddress;
@@ -148,16 +148,6 @@ const formatDecimals = (num, digits = MIN_DIGITS, options = {}, locale = "en-US"
148
148
  }).format(truncatedValue.toNumber());
149
149
  };
150
150
 
151
- const getBase64ImageUrl = base64 => {
152
- const match = /^data:([^;]*?);base64,(.*?)$/.exec(base64);
153
- if (!match) return null;
154
- const buffer = Buffer.from(match[2], "base64");
155
- const blob = new Blob([new Uint8Array(buffer, 0, buffer.length)], {
156
- type: match[1]
157
- });
158
- return URL.createObjectURL(blob);
159
- };
160
-
161
151
  function hasOwnProperty(obj, prop) {
162
152
  if (typeof obj !== "object") return false;
163
153
  if (obj === null) return false;
@@ -204,7 +194,6 @@ exports.classNames = classNames;
204
194
  exports.decodeAnyAddress = decodeAnyAddress;
205
195
  exports.encodeAnyAddress = encodeAnyAddress;
206
196
  exports.formatDecimals = formatDecimals;
207
- exports.getBase64ImageUrl = getBase64ImageUrl;
208
197
  exports.hasOwnProperty = hasOwnProperty;
209
198
  exports.isArrayOf = isArrayOf;
210
199
  exports.isEthereumAddress = isEthereumAddress;
@@ -140,16 +140,6 @@ const formatDecimals = (num, digits = MIN_DIGITS, options = {}, locale = "en-US"
140
140
  }).format(truncatedValue.toNumber());
141
141
  };
142
142
 
143
- const getBase64ImageUrl = base64 => {
144
- const match = /^data:([^;]*?);base64,(.*?)$/.exec(base64);
145
- if (!match) return null;
146
- const buffer = Buffer.from(match[2], "base64");
147
- const blob = new Blob([new Uint8Array(buffer, 0, buffer.length)], {
148
- type: match[1]
149
- });
150
- return URL.createObjectURL(blob);
151
- };
152
-
153
143
  function hasOwnProperty(obj, prop) {
154
144
  if (typeof obj !== "object") return false;
155
145
  if (obj === null) return false;
@@ -188,4 +178,4 @@ function twox64Concat(input) {
188
178
  return u8aToHex(u8aConcat(xxhashAsU8a(input, bitLength), u8aToU8a(input)));
189
179
  }
190
180
 
191
- export { BigMath, Deferred, MAX_DECIMALS_FORMAT, blake2Concat, classNames, decodeAnyAddress, encodeAnyAddress, formatDecimals, getBase64ImageUrl, hasOwnProperty, isArrayOf, isEthereumAddress, planckToTokens, sleep, throwAfter, tokensToPlanck, twox64Concat };
181
+ export { BigMath, Deferred, MAX_DECIMALS_FORMAT, blake2Concat, classNames, decodeAnyAddress, encodeAnyAddress, formatDecimals, hasOwnProperty, isArrayOf, isEthereumAddress, planckToTokens, sleep, throwAfter, tokensToPlanck, twox64Concat };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/util",
3
- "version": "0.0.0-pr790-20230522041511",
3
+ "version": "0.0.0-pr866-20230622032449",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "UNLICENSED",
@@ -32,7 +32,7 @@
32
32
  "@polkadot/keyring": "^12.2.1",
33
33
  "@polkadot/util": "^12.2.1",
34
34
  "@polkadot/util-crypto": "^12.2.1",
35
- "@talismn/eslint-config": "0.0.0-pr790-20230522041511",
35
+ "@talismn/eslint-config": "0.0.2",
36
36
  "@talismn/tsconfig": "0.0.2",
37
37
  "@types/jest": "^27.5.1",
38
38
  "eslint": "^8.4.0",
@@ -1 +0,0 @@
1
- export declare const getBase64ImageUrl: (base64: string) => string | null;