Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
31
node_modules/@protobuf-ts/runtime/build/es2015/lower-camel-case.js
generated
vendored
Normal file
31
node_modules/@protobuf-ts/runtime/build/es2015/lower-camel-case.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* Converts snake_case to lowerCamelCase.
|
||||
*
|
||||
* Should behave like protoc:
|
||||
* https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118
|
||||
*/
|
||||
export function lowerCamelCase(snakeCase) {
|
||||
let capNext = false;
|
||||
const sb = [];
|
||||
for (let i = 0; i < snakeCase.length; i++) {
|
||||
let next = snakeCase.charAt(i);
|
||||
if (next == '_') {
|
||||
capNext = true;
|
||||
}
|
||||
else if (/\d/.test(next)) {
|
||||
sb.push(next);
|
||||
capNext = true;
|
||||
}
|
||||
else if (capNext) {
|
||||
sb.push(next.toUpperCase());
|
||||
capNext = false;
|
||||
}
|
||||
else if (i == 0) {
|
||||
sb.push(next.toLowerCase());
|
||||
}
|
||||
else {
|
||||
sb.push(next);
|
||||
}
|
||||
}
|
||||
return sb.join('');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue