Files
codeql-action/node_modules/glob-hash/lib/normalise.js
T
2020-12-09 21:28:55 +01:00

18 lines
400 B
JavaScript

'use strict';
var path = require('path');
/**
* A utility normalise a path.
*
* The path is first converted to an absolute one,
* then any Windows-style path separators
* are converted to Unix-style ones.
*
* @param {String} p A path to normalise.
* @return {String} The normalised path.
*/
module.exports = function(p) {
return path.resolve(p).replace(/\\/g,'/');
};