diff options
Diffstat (limited to 'node_modules/test-exclude/is-outside-dir-posix.js')
-rw-r--r-- | node_modules/test-exclude/is-outside-dir-posix.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node_modules/test-exclude/is-outside-dir-posix.js b/node_modules/test-exclude/is-outside-dir-posix.js new file mode 100644 index 0000000..d6a7275 --- /dev/null +++ b/node_modules/test-exclude/is-outside-dir-posix.js @@ -0,0 +1,7 @@ +'use strict'; + +const path = require('path'); + +module.exports = function(dir, filename) { + return /^\.\./.test(path.relative(dir, filename)); +}; |