serialize CI_params by index not key to be less space consuming and more like RPCs
parent
29cf3ac259
commit
f7fc3a37ad
|
@ -5542,11 +5542,14 @@ class TaskParameterSerializer {
|
|||
return this.camelize(element.replace('CI_', '').toLowerCase().replace(/_+/g, ' '));
|
||||
}
|
||||
static camelize(string) {
|
||||
return string
|
||||
return TaskParameterSerializer.uncapitalizeFirstLetter(string
|
||||
.replace(/(^\w)|([A-Z])|(\b\w)/g, function (word, index) {
|
||||
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
||||
})
|
||||
.replace(/\s+/g, '');
|
||||
.replace(/\s+/g, ''));
|
||||
}
|
||||
static uncapitalizeFirstLetter(string) {
|
||||
return string.charAt(0).toLowerCase() + string.slice(1);
|
||||
}
|
||||
static serializeFromObject(buildParameters) {
|
||||
const array = [];
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -94,11 +94,17 @@ export class TaskParameterSerializer {
|
|||
}
|
||||
|
||||
private static camelize(string: string) {
|
||||
return string
|
||||
return TaskParameterSerializer.uncapitalizeFirstLetter(
|
||||
string
|
||||
.replace(/(^\w)|([A-Z])|(\b\w)/g, function (word: string, index: number) {
|
||||
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
||||
})
|
||||
.replace(/\s+/g, '');
|
||||
.replace(/\s+/g, ''),
|
||||
);
|
||||
}
|
||||
|
||||
private static uncapitalizeFirstLetter(string: string) {
|
||||
return string.charAt(0).toLowerCase() + string.slice(1);
|
||||
}
|
||||
|
||||
private static serializeFromObject(buildParameters: any) {
|
||||
|
|
Loading…
Reference in New Issue