選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.js 290B

123456789101112
  1. 'use strict';
  2. const path = require('path');
  3. module.exports = (childPath, parentPath) => {
  4. const relation = path.relative(parentPath, childPath);
  5. return Boolean(
  6. relation &&
  7. relation !== '..' &&
  8. !relation.startsWith(`..${path.sep}`) &&
  9. relation !== path.resolve(childPath)
  10. );
  11. };