timepiece/node_modules/path-root-regex/index.js

14 lines
351 B
JavaScript
Raw Normal View History

2024-05-14 14:54:12 +00:00
/*!
* path-root-regex <https://github.com/jonschlinkert/path-root-regex>
*
* Copyright (c) 2016, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
module.exports = function() {
// Regex is modified from the split device regex in the node.js path module.
return /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?/;
};