File: index.js

package info (click to toggle)
node-is-path-inside 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 104 kB
  • sloc: makefile: 4; sh: 2
file content (14 lines) | stat: -rw-r--r-- 236 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'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);
};