@darabonba/python-generator 2.0.10 → 2.0.11
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 +3 -0
- package/lib/helper.js +0 -7
- package/package.json +1 -1
package/ChangeLog.md
CHANGED
package/lib/helper.js
CHANGED
|
@@ -35,8 +35,6 @@ const builtinModels = [
|
|
|
35
35
|
'$ResponseError', '$FileField'
|
|
36
36
|
];
|
|
37
37
|
|
|
38
|
-
const words = ['SSE'];
|
|
39
|
-
|
|
40
38
|
const CORE = 'Dara';
|
|
41
39
|
const REQUEST = '_request';
|
|
42
40
|
const RESPONSE = '_response';
|
|
@@ -221,11 +219,6 @@ function _snakeCase(str) {
|
|
|
221
219
|
}
|
|
222
220
|
let res = '';
|
|
223
221
|
let tmp = '';
|
|
224
|
-
words.forEach(word => {
|
|
225
|
-
// 只匹配驼峰词前缀,不破坏开头
|
|
226
|
-
const regex = new RegExp(word + '(?=[A-Z0-9])', 'g');
|
|
227
|
-
str = str.replace(regex, _upperFirst(word.toLowerCase()));
|
|
228
|
-
});
|
|
229
222
|
for (const c of str) {
|
|
230
223
|
if (/[A-Z|0-9]/.test(c)) {
|
|
231
224
|
tmp += c;
|