aboutsummaryrefslogtreecommitdiff
path: root/node_modules/path-root-regex/index.js
blob: b6eeea43b6fc5b463dab09303863ad1f6493a299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*!
 * 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}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?/;
};