]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/read-package-json/node_modules/glob/node_modules/path-is-absolute/index.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / read-package-json / node_modules / glob / node_modules / path-is-absolute / index.js
1 'use strict';
2
3 function posix(path) {
4         return path.charAt(0) === '/';
5 };
6
7 function win32(path) {
8         // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
9         var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
10         var result = splitDeviceRe.exec(path);
11         var device = result[1] || '';
12         var isUnc = !!device && device.charAt(1) !== ':';
13
14         // UNC paths are always absolute
15         return !!result[2] || isUnc;
16 };
17
18 module.exports = process.platform === 'win32' ? win32 : posix;
19 module.exports.posix = posix;
20 module.exports.win32 = win32;