Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChangeLog

# 2.0.10
- Upgrade the sse function generate function.

# 2.0.9
- Fixed the arr & map init error in from map

Expand Down
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChangeLog

# 2.0.10
- Upgrade the sse function generate function.

# 2.0.9
- Fixed the arr & map init error in from map

Expand Down
7 changes: 0 additions & 7 deletions lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ const builtinModels = [
'$ResponseError', '$FileField'
];

const words = ['SSE'];

const CORE = 'Dara';
const REQUEST = '_request';
const RESPONSE = '_response';
Expand Down Expand Up @@ -221,11 +219,6 @@ function _snakeCase(str) {
}
let res = '';
let tmp = '';
words.forEach(word => {
// 只匹配驼峰词前缀,不破坏开头
const regex = new RegExp(word + '(?=[A-Z0-9])', 'g');
str = str.replace(regex, _upperFirst(word.toLowerCase()));
});
for (const c of str) {
if (/[A-Z|0-9]/.test(c)) {
tmp += c;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@darabonba/python-generator",
"version": "2.0.9",
"version": "2.0.11",
"description": "The darabonba generator for Python",
"main": "lib/generator.js",
"directories": {
Expand Down