is-outside-dir-posix.js 147 B

1234567
  1. 'use strict';
  2. const path = require('path');
  3. module.exports = function(dir, filename) {
  4. return /^\.\./.test(path.relative(dir, filename));
  5. };