mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
10 lines
207 B
JavaScript
10 lines
207 B
JavaScript
const getDependencyName = (requireString) => {
|
|
const [a, b] = requireString.split("/");
|
|
|
|
const scoped = a.startsWith("@");
|
|
|
|
return scoped ? `${a}/${b}` : a;
|
|
};
|
|
|
|
module.exports = { getDependencyName };
|