reduce dbgate-tools package size

This commit is contained in:
Jan Prochazka
2020-11-24 19:06:05 +01:00
parent 5862a2cdc4
commit 556a35f4ba
7 changed files with 27 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
import _ from 'lodash';
import _camelCase from 'lodash/camelCase';
export function extractShellApiPlugins(functionName, props): string[] {
const res = [];
@@ -18,7 +18,7 @@ export function extractShellApiPlugins(functionName, props): string[] {
export function extractShellApiFunctionName(functionName) {
const nsMatch = functionName.match(/^([^@]+)@([^@]+)/);
if (nsMatch) {
return `${_.camelCase(nsMatch[2])}.shellApi.${nsMatch[1]}`;
return `${_camelCase(nsMatch[2])}.shellApi.${nsMatch[1]}`;
}
return `dbgateApi.${functionName}`;
}