@smartsoft001/trans-shell-nestjs 2.102.0 → 2.104.0
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/index.js +19 -21
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -129,24 +129,24 @@ var PasswordService = class _PasswordService {
|
|
|
129
129
|
var SlugService = class _SlugService {
|
|
130
130
|
static {
|
|
131
131
|
this.polishToEnglishMap = {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
132
|
+
\u0105: "a",
|
|
133
|
+
\u0107: "c",
|
|
134
|
+
\u0119: "e",
|
|
135
|
+
\u0142: "l",
|
|
136
|
+
\u0144: "n",
|
|
137
|
+
\u00F3: "o",
|
|
138
|
+
\u015B: "s",
|
|
139
|
+
\u017A: "z",
|
|
140
|
+
\u017C: "z",
|
|
141
|
+
\u0104: "A",
|
|
142
|
+
\u0106: "C",
|
|
143
|
+
\u0118: "E",
|
|
144
|
+
\u0141: "L",
|
|
145
|
+
\u0143: "N",
|
|
146
|
+
\u00D3: "O",
|
|
147
|
+
\u015A: "S",
|
|
148
|
+
\u0179: "Z",
|
|
149
|
+
\u017B: "Z"
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
@@ -161,9 +161,7 @@ var SlugService = class _SlugService {
|
|
|
161
161
|
if (!text) {
|
|
162
162
|
return "";
|
|
163
163
|
}
|
|
164
|
-
let slug = text.split("").map(
|
|
165
|
-
(char) => _SlugService.polishToEnglishMap[char] || char
|
|
166
|
-
).join("");
|
|
164
|
+
let slug = text.split("").map((char) => _SlugService.polishToEnglishMap[char] || char).join("");
|
|
167
165
|
slug = slug.toLowerCase();
|
|
168
166
|
slug = slug.replace(/[^a-z0-9]+/g, "-");
|
|
169
167
|
slug = slug.replace(/-+/g, "-");
|