feat(core): add support to controller path alias and refactor shard util

This commit is contained in:
miZyind
2020-08-22 18:10:59 +07:00
parent f90af4911d
commit bead1f4a57
11 changed files with 138 additions and 59 deletions

View File

@@ -24,7 +24,7 @@ export const isPlainObject = (fn: any): fn is object => {
);
};
export const validatePath = (path?: string): string =>
export const addLeadingSlash = (path?: string): string =>
path ? (path.charAt(0) !== '/' ? '/' + path : path) : '';
export const isFunction = (fn: any): boolean => typeof fn === 'function';