@thirdweb-dev/crypto
Advanced tools
Comparing version 0.0.0-dev-9467fc3-20231117115135 to 0.0.0-dev-9a806f5397c9e5803c9def6653939e5e4df56a3c-20240402141044
@@ -27,15 +27,13 @@ 'use strict'; | ||
class TextProcessorCache { | ||
#encoder; | ||
#decoder; | ||
get encoder() { | ||
if (!this.#encoder) { | ||
this.#encoder = new TextEncoder(); | ||
if (!this._encoder) { | ||
this._encoder = new TextEncoder(); | ||
} | ||
return this.#encoder; | ||
return this._encoder; | ||
} | ||
get decoder() { | ||
if (!this.#decoder) { | ||
this.#decoder = new TextDecoder(); | ||
if (!this._decoder) { | ||
this._decoder = new TextDecoder(); | ||
} | ||
return this.#decoder; | ||
return this._decoder; | ||
} | ||
@@ -424,3 +422,5 @@ } | ||
} | ||
totalLength ??= arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0); | ||
if (totalLength === null || totalLength === undefined) { | ||
totalLength = arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0); | ||
} | ||
const returnValue = new Uint8Array(totalLength); | ||
@@ -427,0 +427,0 @@ let offset = 0; |
@@ -27,15 +27,13 @@ 'use strict'; | ||
class TextProcessorCache { | ||
#encoder; | ||
#decoder; | ||
get encoder() { | ||
if (!this.#encoder) { | ||
this.#encoder = new TextEncoder(); | ||
if (!this._encoder) { | ||
this._encoder = new TextEncoder(); | ||
} | ||
return this.#encoder; | ||
return this._encoder; | ||
} | ||
get decoder() { | ||
if (!this.#decoder) { | ||
this.#decoder = new TextDecoder(); | ||
if (!this._decoder) { | ||
this._decoder = new TextDecoder(); | ||
} | ||
return this.#decoder; | ||
return this._decoder; | ||
} | ||
@@ -424,3 +422,5 @@ } | ||
} | ||
totalLength ??= arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0); | ||
if (totalLength === null || totalLength === undefined) { | ||
totalLength = arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0); | ||
} | ||
const returnValue = new Uint8Array(totalLength); | ||
@@ -427,0 +427,0 @@ let offset = 0; |
@@ -5,15 +5,13 @@ import { sha256 as sha256$1 } from '@noble/hashes/sha256'; | ||
class TextProcessorCache { | ||
#encoder; | ||
#decoder; | ||
get encoder() { | ||
if (!this.#encoder) { | ||
this.#encoder = new TextEncoder(); | ||
if (!this._encoder) { | ||
this._encoder = new TextEncoder(); | ||
} | ||
return this.#encoder; | ||
return this._encoder; | ||
} | ||
get decoder() { | ||
if (!this.#decoder) { | ||
this.#decoder = new TextDecoder(); | ||
if (!this._decoder) { | ||
this._decoder = new TextDecoder(); | ||
} | ||
return this.#decoder; | ||
return this._decoder; | ||
} | ||
@@ -402,3 +400,5 @@ } | ||
} | ||
totalLength ??= arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0); | ||
if (totalLength === null || totalLength === undefined) { | ||
totalLength = arrays.reduce((accumulator, currentValue) => accumulator + currentValue.length, 0); | ||
} | ||
const returnValue = new Uint8Array(totalLength); | ||
@@ -405,0 +405,0 @@ let offset = 0; |
{ | ||
"name": "@thirdweb-dev/crypto", | ||
"version": "0.0.0-dev-9467fc3-20231117115135", | ||
"version": "0.0.0-dev-9a806f5397c9e5803c9def6653939e5e4df56a3c-20240402141044", | ||
"main": "dist/thirdweb-dev-crypto.cjs.js", | ||
@@ -13,3 +13,3 @@ "module": "dist/thirdweb-dev-crypto.esm.js", | ||
}, | ||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/utils", | ||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/utils", | ||
"license": "Apache-2.0", | ||
@@ -31,4 +31,4 @@ "bugs": { | ||
"dependencies": { | ||
"@noble/hashes": "^1.3.2", | ||
"js-sha3": "^0.9.2" | ||
"@noble/hashes": "^1.4.0", | ||
"js-sha3": "^0.9.3" | ||
}, | ||
@@ -38,10 +38,10 @@ "devDependencies": { | ||
"@thirdweb-dev/tsconfig": "^0.1.7", | ||
"@types/crypto-js": "^4.2.1", | ||
"@types/crypto-js": "^4.2.2", | ||
"crypto-js": "^4.2.0", | ||
"eslint-config-thirdweb": "^0.0.0-dev-9467fc3-20231117115135", | ||
"eslint-config-thirdweb": "^0.0.0-dev-9a806f5397c9e5803c9def6653939e5e4df56a3c-20240402141044", | ||
"ethers": "^5.7.2", | ||
"js-awe": "^1.0.63", | ||
"tinybench": "^2.5.1", | ||
"typescript": "^5.2.2", | ||
"viem": "^1.19.3" | ||
"js-awe": "^1.0.65", | ||
"tinybench": "^2.6.0", | ||
"typescript": "5.4.3", | ||
"viem": "2.9.6" | ||
}, | ||
@@ -48,0 +48,0 @@ "engines": { |
<p align="center"> | ||
<br /> | ||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> | ||
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> | ||
<br /> | ||
@@ -5,0 +5,0 @@ </p> |
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 repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
108588
Updated@noble/hashes@^1.4.0
Updatedjs-sha3@^0.9.3