MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / getPkgNameAndVersion

Function getPkgNameAndVersion

modules/material-parser/src/localize.ts:78–90  ·  view source on GitHub ↗
(pkgNameWithVersion: string)

Source from the content-addressed store, hash-verified

76 * @memberof OnlineAccesser
77 */
78export function getPkgNameAndVersion(pkgNameWithVersion: string): { [key: string]: any } {
79 const matches = pkgNameWithVersion.match(/(@[^/]+)$/);
80 if (!matches) {
81 return {
82 name: pkgNameWithVersion,
83 };
84 }
85 const name = pkgNameWithVersion.replace(matches[0], '');
86 return {
87 version: matches[0].slice(1),
88 name,
89 };
90}
91
92// 将问题转化为本地物料化场景
93export default async function localize(options: IMaterializeOnlineOptions): Promise<{

Callers 2

localize.test.tsFile · 0.90
localizeFunction · 0.85

Calls 2

matchMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…