@vdhewei/xlsx-template-lib 1.3.2 → 1.3.4
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/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3076,14 +3076,20 @@ var extractMacro = function(expr, options) {
|
|
|
3076
3076
|
return extracResult;
|
|
3077
3077
|
};
|
|
3078
3078
|
var __codeKey = (str) => {
|
|
3079
|
-
|
|
3080
|
-
for (
|
|
3081
|
-
|
|
3079
|
+
const replaces = [" ", `-`, `/`, `,`, `'`, `&`, `.`, `(`, `)`, `{`, `}`, `@`, `\\`, `[`, `]`, `#`, `:`];
|
|
3080
|
+
for (const k of replaces) {
|
|
3081
|
+
str = str.replaceAll(k, "_").trim();
|
|
3082
|
+
if (str.indexOf("__") >= 0) {
|
|
3083
|
+
str = str.replaceAll("__", "_");
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
if (str.startsWith("_")) {
|
|
3087
|
+
str = str.substring(1);
|
|
3082
3088
|
}
|
|
3083
|
-
|
|
3084
|
-
|
|
3089
|
+
if (str.endsWith("_")) {
|
|
3090
|
+
str = str.substring(0, str.length - 1);
|
|
3085
3091
|
}
|
|
3086
|
-
return
|
|
3092
|
+
return str.toUpperCase();
|
|
3087
3093
|
};
|
|
3088
3094
|
var __numberKey = (str) => {
|
|
3089
3095
|
return Number.parseInt(str, 10).toString();
|