work.suroh.tk/node_modules/is-path-inside/index.js

15 lines
236 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
'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);
};