FLUJOS/BACK_BACK/node_modules/parcel-bundler/lib/utils/getModuleParts.js
2025-11-07 00:06:12 +01:00

14 lines
No EOL
328 B
JavaScript
Executable file

"use strict";
const path = require('path');
module.exports = function (name) {
let parts = path.normalize(name).split(path.sep);
if (parts[0].charAt(0) === '@') {
// Scoped module (e.g. @scope/module). Merge the first two parts back together.
parts.splice(0, 2, `${parts[0]}/${parts[1]}`);
}
return parts;
};