@chainsafe/ssz
Advanced tools
Comparing version 0.10.1 to 0.10.2
@@ -23,2 +23,9 @@ # Change Log | ||
## [0.10.2](https://github.com/ChainSafe/ssz/compare/ssz-v0.10.1...ssz-v0.10.2) (2023-02-28) | ||
### Bug Fixes | ||
* Remove replaceAll with replace(/.../g,... for ES2019 compatibility ([#309](https://github.com/ChainSafe/ssz/issues/309)) ([3c0a2c5](https://github.com/ChainSafe/ssz/commit/3c0a2c5dfe678925cd1b35b486b66738cdb12e99)) | ||
## [0.9.4](http://chainsafe/ssz/compare/@chainsafe/ssz@0.9.3...@chainsafe/ssz@0.9.4) (2022-12-08) | ||
@@ -25,0 +32,0 @@ |
@@ -7,11 +7,11 @@ "use strict"; | ||
snake: (field) => field | ||
.replaceAll(/[^0-z]/g, "") | ||
.replaceAll(/[a-z][A-Z]|[0-9][A-Z]/g, (substr) => substr[0] + "_" + substr[1].toLowerCase()), | ||
.replace(/[^0-z]/g, "") | ||
.replace(/[a-z][A-Z]|[0-9][A-Z]/g, (substr) => substr[0] + "_" + substr[1].toLowerCase()), | ||
constant: (field) => field | ||
.replaceAll(/[^0-z]/g, "") | ||
.replaceAll(/[a-z][A-Z]|[0-9][A-Z]/g, (substr) => substr[0] + "_" + substr[1]) | ||
.replace(/[^0-z]/g, "") | ||
.replace(/[a-z][A-Z]|[0-9][A-Z]/g, (substr) => substr[0] + "_" + substr[1]) | ||
.toUpperCase(), | ||
pascal: (field) => { | ||
const first = field[0].toUpperCase(); | ||
return (first + field.slice(1)).replaceAll(/[^0-z]/g, ""); | ||
return (first + field.slice(1)).replace(/[^0-z]/g, ""); | ||
}, | ||
@@ -26,4 +26,4 @@ camel: (field) => { | ||
.slice(1) | ||
.replaceAll(/[^0-z]/g, "") | ||
.replaceAll(/[a-z][A-Z]|[0-9][A-Z]/g, (substr) => substr[0] + "-" + substr[1])); | ||
.replace(/[^0-z]/g, "") | ||
.replace(/[a-z][A-Z]|[0-9][A-Z]/g, (substr) => substr[0] + "-" + substr[1])); | ||
}, | ||
@@ -30,0 +30,0 @@ eth2: (field) => exports.Case.snake(field).replace(/(\d)$/, "_$1"), |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/chainsafe/ssz", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"main": "lib/index.js", | ||
@@ -10,0 +10,0 @@ "files": [ |
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
471429