mirror of https://github.com/abpframework/abp.git
2 changed files with 12 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
import { dir } from './text'; |
|||
|
|||
export function relativePathFromServiceToModel(serviceNamespace: string, modelNamespace: string) { |
|||
const repeats = serviceNamespace ? serviceNamespace.split('.').length : 0; |
|||
const path = '..' + '/..'.repeat(repeats) + '/models/' + dir(modelNamespace); |
|||
return removeTrailingSlash(path); |
|||
} |
|||
|
|||
function removeTrailingSlash(path: string) { |
|||
return path.replace(/\/+$/, ''); |
|||
} |
|||
Loading…
Reference in new issue