mirror of
https://github.com/nodejs/node.git
synced 2025-05-10 19:17:56 +00:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
15 lines
236 B
JavaScript
15 lines
236 B
JavaScript
'use strict';
|
|
var path = require('path');
|
|
var pathIsInside = require('path-is-inside');
|
|
|
|
module.exports = function (a, b) {
|
|
a = path.resolve(a);
|
|
b = path.resolve(b);
|
|
|
|
if (a === b) {
|
|
return false;
|
|
}
|
|
|
|
return pathIsInside(a, b);
|
|
};
|