paths.js 376 Bytes
Newer Older
YazhouChen's avatar
YazhouChen committed
1 2 3 4 5 6 7 8 9 10 11 12 13
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ensureAbsolutePath = ensureAbsolutePath;

var _path = require('path');

// eslint-disable-next-line import/prefer-default-export
function ensureAbsolutePath(path, basePath) {
  return _path.posix.isAbsolute(path) || _path.win32.isAbsolute(path) ? path : (0, _path.join)(basePath, path);
}